Message237864
Example:
>>> import socket
>>> x = socket.AddressFamily.from_bytes(b'\1', 'big')
>>> type(x)
<enum 'AddressFamily'>
>>> int(x)
1
>>> str(x)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/serhiy/py/cpython/Lib/enum.py", line 464, in __str__
return "%s.%s" % (self.__class__.__name__, self._name_)
AttributeError: 'AddressFamily' object has no attribute '_name_'
>>> repr(x)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/serhiy/py/cpython/Lib/enum.py", line 461, in __repr__
self.__class__.__name__, self._name_, self._value_)
AttributeError: 'AddressFamily' object has no attribute '_name_' |
|
Date |
User |
Action |
Args |
2015-03-11 13:34:36 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, barry, eli.bendersky, ethan.furman |
2015-03-11 13:34:36 | serhiy.storchaka | set | messageid: <1426080876.51.0.657090719237.issue23640@psf.upfronthosting.co.za> |
2015-03-11 13:34:36 | serhiy.storchaka | link | issue23640 messages |
2015-03-11 13:34:36 | serhiy.storchaka | create | |
|