Package twisted :: Package python :: Module compat |
[show private | hide private]
[frames | no frames]

## Module twisted.python.compat

Compatability module to provide backwards compatability for useful Python features.

This is mainly for use of internal Twisted code. We encourage you to use the latest version of Python directly from your code, if possible.

Function Summary
| ``dict`(*arg, **kwargs)` dict() -> new empty dictionary.
| `inet_pton(af, addr)`
| `inet_ntop(af, addr)`

Variable Summary
`int` | `True`
`int` | `False`
`tuple` | `StringTypes`

Function Details

### dict(*arg, **kwargs)
    dict() -> new empty dictionary.
    dict(mapping) -> new dictionary initialized from a mapping object's
        (key, value) pairs.
    dict(seq) -> new dictionary initialized as if via:
        d = {}
        for k, v in seq:
            d[k] = v
    dict(**kwargs) -> new dictionary initialized with the name=value pairs
        in the keyword argument list.  For example:  dict(one=1, two=2)

Variable Details

    ### False Type: `int` Value:
        0

    ### StringTypes Type: `tuple` Value:
        (<type 'str'>, <type 'unicode'>)

    ### True Type: `int` Value:
        1

Generated by Epydoc 1.1 on Thu May 8 13:16:48 2003 | http://epydoc.sf.net