[issue23011] Duplicate Paragraph in documentation for json module

2014-12-08 Thread Simeon Visser
Simeon Visser added the comment: What paragraph are you referring to? Various documented parameters are similar but I don't see duplicate paragraphs. -- nosy: +simeon.visser ___ Python tracker <http://bugs.python.org/is

[issue22997] Minor improvements to "Functional API" section of Enum documentation

2014-12-04 Thread Simeon Visser
Changes by Simeon Visser : -- keywords: +patch Added file: http://bugs.python.org/file37360/issue22997.patch ___ Python tracker <http://bugs.python.org/issue22

[issue22997] Minor improvements to "Functional API" section of Enum documentation

2014-12-04 Thread Simeon Visser
New submission from Simeon Visser: This patch contributes two changes to the "Functional API" section of the Enum documentation: - Early in the section it mentions four different ways of creating an Enum but later it only lists three different ways (the "sequence of names&qu

[issue22994] datetime buggy

2014-12-04 Thread Simeon Visser
Simeon Visser added the comment: Datetimes in local timezones should be created using localize(): >>> zon.localize(datetime.datetime(2015, 2, 1)).isoformat() '2015-02-01T00:00:00-08:00' See the two supported methods of creating local datetimes at: http://pytz.sourceforge.n

[issue22979] Use of None in min and max

2014-12-02 Thread Simeon Visser
Simeon Visser added the comment: So, to clarify, as the problem no longer occurs in Python 3 (as it requires the caller to provide only orderable objects) I'm not sure a meaningful change can be made here. It would require changing the behaviour of min/max in Python 2.7.x in a way that

[issue22979] Use of None in min and max

2014-12-02 Thread Simeon Visser
Simeon Visser added the comment: This doesn't happen in Python 3 as None can't be compared to other elements: >>> min([1,2,3,None]) Traceback (most recent call last): File "", line 1, in TypeError: unorderable types: NoneType() < int() I can also imagi

[issue20467] Confusing wording about __init__

2014-11-30 Thread Simeon Visser
Simeon Visser added the comment: Is it worth clarifying that __init__ can return a value but only the value None? The following won't raise a TypeError: class O(object): def __init__(self): return None Admittedly the "return None" is the default behaviour but peo