mirror of https://github.com/python/cpython
Indent ipaddress.ip_address() example correctly
This commit is contained in:
parent
c2fcbf4ed0
commit
6bbc83986d
|
@ -24,6 +24,10 @@ This is the full module API reference—for an overview and introduction, see
|
||||||
|
|
||||||
.. versionadded:: 3.3
|
.. versionadded:: 3.3
|
||||||
|
|
||||||
|
.. testsetup::
|
||||||
|
>>> import ipaddress
|
||||||
|
>>> from ipaddress import (ip_network, IPv4Address, IPv4Interface,
|
||||||
|
... IPv4Network)
|
||||||
|
|
||||||
Convenience factory functions
|
Convenience factory functions
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
@ -39,13 +43,6 @@ IP addresses, networks and interfaces:
|
||||||
A :exc:`ValueError` is raised if *address* does not represent a valid IPv4
|
A :exc:`ValueError` is raised if *address* does not represent a valid IPv4
|
||||||
or IPv6 address.
|
or IPv6 address.
|
||||||
|
|
||||||
.. testsetup::
|
|
||||||
>>> import ipaddress
|
|
||||||
>>> from ipaddress import (ip_network, IPv4Address, IPv4Interface,
|
|
||||||
... IPv4Network)
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
>>> ipaddress.ip_address('192.168.0.1')
|
>>> ipaddress.ip_address('192.168.0.1')
|
||||||
IPv4Address('192.168.0.1')
|
IPv4Address('192.168.0.1')
|
||||||
>>> ipaddress.ip_address('2001:db8::')
|
>>> ipaddress.ip_address('2001:db8::')
|
||||||
|
|
Loading…
Reference in New Issue