[Python-checkins] r82622 - sandbox/branches/py3k-datetime/datetime.py
alexander.belopolsky
python-checkins at python.org
Wed Jul 7 16:18:42 CEST 2010
Author: alexander.belopolsky
Date: Wed Jul 7 16:18:42 2010
New Revision: 82622
Log:
Renamed the sentinel from _NoneGiven to _Omitted. Thanks Nick Coghlan.
Modified:
sandbox/branches/py3k-datetime/datetime.py
Modified: sandbox/branches/py3k-datetime/datetime.py
==============================================================================
--- sandbox/branches/py3k-datetime/datetime.py (original)
+++ sandbox/branches/py3k-datetime/datetime.py Wed Jul 7 16:18:42 2010
@@ -1785,9 +1785,9 @@
__slots__ = '_offset', '_name'
# Sentinel value to disallow None
- _NoneGiven = object()
- def __init__(self, offset, name=_NoneGiven):
- if name is self._NoneGiven:
+ _Omitted = object()
+ def __init__(self, offset, name=_Omitted):
+ if name is self._Omitted:
name = None
elif not isinstance(name, str):
raise TypeError("name must be a string")
More information about the Python-checkins
mailing list