diff options
author | mathieui <mathieui@mathieui.net> | 2012-05-21 02:14:25 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2012-05-21 02:14:25 +0200 |
commit | 0af1c7fe9a03be34e14ae8ecc332f6d1fa168511 (patch) | |
tree | 845d50087b964486c1274cbecf3ebda30a21de0f /src/contact.py | |
parent | 837b46d68b10f5c6e9cc80e07e33fd025b51634b (diff) | |
download | poezio-0af1c7fe9a03be34e14ae8ecc332f6d1fa168511.tar.gz poezio-0af1c7fe9a03be34e14ae8ecc332f6d1fa168511.tar.bz2 poezio-0af1c7fe9a03be34e14ae8ecc332f6d1fa168511.tar.xz poezio-0af1c7fe9a03be34e14ae8ecc332f6d1fa168511.zip |
Docstrings, and small cleanup
Diffstat (limited to 'src/contact.py')
-rw-r--r-- | src/contact.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/contact.py b/src/contact.py index 69dfb984..8d3b2bdf 100644 --- a/src/contact.py +++ b/src/contact.py @@ -7,13 +7,13 @@ """ Defines the Resource and Contact classes, which are used in -the roster +the roster. """ import logging log = logging.getLogger(__name__) -from sleekxmpp.xmlstream.stanzabase import JID +from sleekxmpp.xmlstream import JID class Resource(object): """ @@ -21,6 +21,9 @@ class Resource(object): It's a precise resource. """ def __init__(self, jid, data): + """ + data: the dict to use as a source + """ self._jid = JID(jid) # Full jid self._data = data @@ -63,11 +66,12 @@ class Contact(object): @property def bare_jid(self): - """The bare_jid or the contact""" + """The bare jid of the contact""" return self.__item.jid @property def name(self): + """The name of the contact or an empty string.""" return self.__item['name'] or '' @property @@ -77,6 +81,7 @@ class Contact(object): @property def pending_in(self): + """We received a subscribe stanza from this contact.""" return self.__item['pending_in'] @pending_in.setter @@ -85,6 +90,7 @@ class Contact(object): @property def pending_out(self): + """We sent a subscribe stanza to this contact.""" return self.__item['pending_out'] @pending_out.setter |