...
ValueError
- >>> test(None, 1)
+ >>> test(None, 1) # doctest: +ELLIPSIS
Traceback (most recent call last):
...
- TypeError: 'NoneType' object is unsubscriptable
+ TypeError: 'NoneType' object is ...
"""
return d[index]
cdef class Subscriptable:
def __getitem__(self, key):
- return key
\ No newline at end of file
+ return key
"""
import sys
-if sys.version_info[0] >= 3:
+if sys.version_info >= (2,7):
__doc__ = __doc__.replace(u'is unsubscriptable', u'is not subscriptable')
elif sys.version_info < (2,5):
__doc__ = __doc__.replace(u"'int' object is unsubscriptable", u'unsubscriptable object')