>>> gen = generate_ints(3)
>>> gen
- <generator object at ...>
+ <generator object generate_ints at ...>
>>> gen.next()
0
>>> gen.next()
>>> import re
>>> p = re.compile('ab*')
>>> print p
- <re.RegexObject instance at 80b4150>
+ <_sre.SRE_Pattern object at 80b4150>
:func:`re.compile` also accepts an optional *flags* argument, used to enable
various special features and syntax variations. We'll go over the available
>>> Decimal('3.214').quantize(TWOPLACES, context=Context(traps=[Inexact]))
Traceback (most recent call last):
...
- Inexact
+ Inexact: None
Q. Once I have valid two place inputs, how do I maintain that invariant
throughout an application?
:exc:`socket.error` will be raised. Note that exactly what is valid depends on
the underlying C implementation of :cfunc:`inet_aton`.
- :func:`inet_aton` does not support IPv6, and :func:`getnameinfo` should be used
+ :func:`inet_aton` does not support IPv6, and :func:`inet_pton` should be used
instead for IPv4/v6 dual stack support.
If the string passed to this function is not exactly 4 bytes in length,
:exc:`socket.error` will be raised. :func:`inet_ntoa` does not support IPv6, and
- :func:`getnameinfo` should be used instead for IPv4/v6 dual stack support.
+ :func:`inet_ntop` should be used instead for IPv4/v6 dual stack support.
.. function:: inet_pton(address_family, ip_string)
Availability: Unix (maybe not all platforms).
+ .. seealso::
+
+ :func:`ipaddr.BaseIP.packed`
+ Platform-independent conversion to a packed, binary format.
+
.. versionadded:: 2.3
.. method:: ServerProxy.system.methodSignature(name)
This method takes one parameter, the name of a method implemented by the XML-RPC
- server.It returns an array of possible signatures for this method. A signature
+ server. It returns an array of possible signatures for this method. A signature
is an array of types. The first of these types is the return type of the method,
the rest are parameters.
If no signature is defined for the method, a non-array value is returned. In
Python this means that the type of the returned value will be something other
- that list.
+ than list.
.. method:: ServerProxy.system.methodHelp(name)
The following identifiers are used as reserved words, or *keywords* of the
language, and cannot be used as ordinary identifiers. They must be spelled
-exactly as written here::
+exactly as written here:
+
+.. sourcecode:: text
and del from not while
as elif global or with