Manual talk:Pywikibot/Development/Guidelines

Stop using "Robot"?
I am in favor of using "bot" instead of "robot" in messages mainly because it's shorter, but is this already a standard or a change proposed to be a standard? I see more than 1,000 instances of "Robot:" (some of which are not English though) in i18n. whym (talk) 23:24, 23 May 2014 (UTC)
 * I fixed all of "robot" usage in documentation but in edit summaries there is no need to change it in languages except English, e.g. it's quite common in Dutch to call bot "robot" and in Persian they call "robot" instead of bot and they don't have any word for it. Ladsgroup (talk) 05:05, 24 May 2014 (UTC)
 * yes, I would exclude non-English messages and "1,000" is an overestimation. I just wanted to note that some English summaries still contain "Robot". whym (talk) 05:35, 24 May 2014 (UTC)
 * Please see 135183. whym (talk) 05:45, 24 May 2014 (UTC)

Single or double quotes?
I am still finding adjoining lines using different styles. -- Ricordi  samoa  01:24, 24 May 2014 (UTC)
 * Good question. I checked the internet and it seems there is no standard about it and people are debating and majority are in favor of double quotes. some interesting links:


 * http://stackoverflow.com/questions/56011/single-quotes-vs-double-quotes-in-python
 * http://henry.precheur.org/python/python_quote (this is quite interesting and personally I think the writer is right)
 * even a question in quora

But for adjoining line I think " is better but what I'm saying is completely personal and it's no standard. Best Ladsgroup (talk) 05:05, 24 May 2014 (UTC)


 * I think either is fine. I personally use " by default and ' if there's an " in the string, but I have also caught myself using ' on one line, then " on the other. I'm fine with explicitly preferring either, but I'm also fine with not explicitly stating either. Valhallasw (talk) 21:51, 8 June 2014 (UTC)

String formatting
The framework uses the  operator, but [//docs.python.org/2/library/stdtypes.html#str.format the official Python 2 documentation] says that   «is the new standard in Python 3, and should be preferred to the % formatting». -- Ricordi  samoa  09:18, 25 May 2014 (UTC)
 * Because we need to move towards python 3 compatibility, I'm in favor of adding this (and fixing it in codes slowly), but at first we need to check utf-8 compatibility Ladsgroup (talk) 09:31, 2 June 2014 (UTC)
 * The '%' formatting is still usable in Py3k. The .format method does have slightly better readability ("{abc}" instead of "%(abc)s", and you can do "{page.title}" inline). I'm not sure what Amir means with 'utf-8 compatibility' - the formatting methods are equivalent in the aspect of unicode. Valhallasw (talk) 21:50, 8 June 2014 (UTC)