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
Changes by Simeon Visser :
--
keywords: +patch
Added file: http://bugs.python.org/file37360/issue22997.patch
___
Python tracker
<http://bugs.python.org/issue22
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
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
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
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
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