namedutils docs tweaks

This commit is contained in:
Mahmoud Hashemi 2015-04-01 00:31:45 -07:00
parent 6b47ca71a8
commit 19b2463c0c
1 changed files with 11 additions and 8 deletions

View File

@ -1,18 +1,21 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""The ``namedutils`` module defines two lightweight container types: """\
``namedtuple`` and ``namedlist``. Both are subtypes of built-in The ``namedutils`` module defines two lightweight container types:
:class:`namedtuple` and :class:`namedlist`. Both are subtypes of built-in
sequence types, which are very fast and efficient. They simply add sequence types, which are very fast and efficient. They simply add
named attribute accessors for specific indexes within themselves. named attribute accessors for specific indexes within themselves.
The ``namedtuple`` is identical to the built-in The :class:`namedtuple` is identical to the built-in
``collections.namedtuple``, with a couple of enhancements, including a :class:`collections.namedtuple`, with a couple of enhancements,
``__repr__`` more suitable to inheritance. The ``namedlist`` is the including a ``__repr__`` more suitable to inheritance.
mutable counterpart to the ``namedtuple``, and is much faster and
lighter weight than full-fledged ``object``s. If you want an even The :class:`namedlist` is the mutable counterpart to the
:class:`namedtuple`, and is much faster and lighter-weight than
full-blown :class:`object`. Consider this if you're implementing nodes
in a tree, graph, or other mutable data structure. If you want an even
skinnier approach, you'll probably have to look to C. skinnier approach, you'll probably have to look to C.
""" """
import sys as _sys import sys as _sys
from collections import OrderedDict from collections import OrderedDict
from keyword import iskeyword as _iskeyword from keyword import iskeyword as _iskeyword