summaryrefslogtreecommitdiffstats
path: root/ipalib/base.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2009-01-02 00:35:42 -0700
committerJason Gerard DeRose <jderose@redhat.com>2009-01-02 00:35:42 -0700
commitea7f9594dfd7e781e9ce06aabb17388071749855 (patch)
tree5bad50d1ef96950666f21c1b4c96f857ff88a4e5 /ipalib/base.py
parentb3063dbb8a652c9eb4eea940fff3032e2082dce3 (diff)
downloadfreeipa-ea7f9594dfd7e781e9ce06aabb17388071749855.tar.gz
freeipa-ea7f9594dfd7e781e9ce06aabb17388071749855.tar.xz
freeipa-ea7f9594dfd7e781e9ce06aabb17388071749855.zip
A few docstring edits in base.NameSpace
Diffstat (limited to 'ipalib/base.py')
-rw-r--r--ipalib/base.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/ipalib/base.py b/ipalib/base.py
index 6fcd248f..d8394874 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)}