Message237864
| Author |
serhiy.storchaka |
| Recipients |
barry, eli.bendersky, ethan.furman, serhiy.storchaka |
| Date |
2015年03月11日.13:34:36 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1426080876.51.0.657090719237.issue23640@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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_' |
|
History
|
|---|
| 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 |
|