diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2009-01-02 00:35:42 -0700 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2009-01-02 00:35:42 -0700 |
commit | ea7f9594dfd7e781e9ce06aabb17388071749855 (patch) | |
tree | 5bad50d1ef96950666f21c1b4c96f857ff88a4e5 | |
parent | b3063dbb8a652c9eb4eea940fff3032e2082dce3 (diff) | |
download | freeipa-ea7f9594dfd7e781e9ce06aabb17388071749855.tar.gz freeipa-ea7f9594dfd7e781e9ce06aabb17388071749855.tar.xz freeipa-ea7f9594dfd7e781e9ce06aabb17388071749855.zip |
A few docstring edits in base.NameSpace
-rw-r--r-- | ipalib/base.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ipalib/base.py b/ipalib/base.py index 6fcd248f2..d83948747 100644 --- a/ipalib/base.py +++ b/ipalib/base.py @@ -311,16 +311,18 @@ class NameSpace(ReadOnly): ['member0', 'member1', 'member2'] Although not a standard container feature, the `NameSpace.__call__()` method - provides a convenient (and efficient) way to iterate through the members, - like an ordered version of the ``dict.itervalues()`` method. For example: + provides a convenient (and efficient) way to iterate through the *members* + (as opposed to the member names). Think of it like an ordered version of + the ``dict.itervalues()`` method. For example: >>> list(ns[name] for name in ns) # One way to do it [Member(0), Member(1), Member(2)] - >>> list(ns()) # A more efficient, less verbose way to do it + >>> list(ns()) # A more efficient, simpler way to do it [Member(0), Member(1), Member(2)] - As another convenience, the `NameSpace.__todict__()` method will return a - copy of the ``dict`` mapping the member names to the members. For example: + Another convenience method is `NameSpace.__todict__()`, which will return + a copy of the ``dict`` mapping the member names to the members. + For example: >>> ns.__todict__() {'member1': Member(1), 'member0': Member(0), 'member2': Member(2)} |