mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-40066: Enum: modify repr()
and str()
(GH-22392)
* Enum: streamline repr() and str(); improve docs - repr() is now ``enum_class.member_name`` - stdlib global enums are ``module_name.member_name`` - str() is now ``member_name`` - add HOW-TO section for ``Enum`` - change main documentation to be an API reference
This commit is contained in:
parent
51a85ddce8
commit
b775106d94
19 changed files with 2225 additions and 1491 deletions
|
@ -785,9 +785,9 @@ The :mod:`socket` module also offers various network-related services:
|
|||
system if IPv6 isn't enabled)::
|
||||
|
||||
>>> socket.getaddrinfo("example.org", 80, proto=socket.IPPROTO_TCP)
|
||||
[(<AddressFamily.AF_INET6: 10>, <SocketType.SOCK_STREAM: 1>,
|
||||
[(socket.AF_INET6, socket.SOCK_STREAM,
|
||||
6, '', ('2606:2800:220:1:248:1893:25c8:1946', 80, 0, 0)),
|
||||
(<AddressFamily.AF_INET: 2>, <SocketType.SOCK_STREAM: 1>,
|
||||
(socket.AF_INET, socket.SOCK_STREAM,
|
||||
6, '', ('93.184.216.34', 80))]
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue