Trees | Index | Help |
|
---|
Module database :: Class basedataobject |
|
object
--+ |dict
--+ | basedataobject
CallHistoryDataobject
,
CannedMsgDataObject
,
MasterListDataObject
,
PlaylistDataObject
,
PlaylistEntryDataObject
,
SMSDataObject
A base object derived from dict that is used for various records. Existing code can just continue to treat it as a dict. New code can treat it as dict, as well as access via attribute names (ie object["foo"] or object.foo). attribute name access will always give a result includes None if the name is not in the dict.
As a bonus this class includes checking of attribute names and types in non-production runs. That will help catch typos etc. For production runs we may be receiving data that was written out by a newer version of BitPim so we don't check or error.Method Summary | |
---|---|
__delattr__(self,
name)
| |
__getattr__(self,
name)
| |
__getitem__(self,
name)
| |
__setattr__(self,
name,
value)
| |
__setitem__(self,
name,
value)
| |
Ensures this entry has a serial | |
Returns the BitPim serial for this item | |
update(self,
items)
| |
Inherited from dict | |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature | |
x.__cmp__(y) <==> cmp(x,y) | |
D.__contains__(k) -> True if D has a key k, else False | |
x.__delitem__(y) <==> del x[y] | |
x.__eq__(y) <==> x==y | |
x.__ge__(y) <==> x>=y | |
x.__getattribute__('name') <==> x.name | |
x.__gt__(y) <==> x>y | |
x.__hash__() <==> hash(x) | |
x.__iter__() <==> iter(x) | |
x.__le__(y) <==> x<=y | |
x.__len__() <==> len(x) | |
x.__lt__(y) <==> x<y | |
x.__ne__(y) <==> x!=y | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
x.__repr__() <==> repr(x) | |
D.clear() -> None. | |
D.copy() -> a shallow copy of D | |
D.get(k[,d]) -> D[k] if k in D, else d. | |
D.has_key(k) -> True if D has a key k, else False | |
D.items() -> list of D's (key, value) pairs, as 2-tuples | |
D.iteritems() -> an iterator over the (key, value) items of D | |
D.iterkeys() -> an iterator over the keys of D | |
D.itervalues() -> an iterator over the values of D | |
D.keys() -> list of D's keys | |
If key is not found, d is returned if given, otherwise KeyError is raised | |
2-tuple; but raise KeyError if D is empty | |
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D | |
D.values() -> list of D's values | |
Inherited from object | |
helper for pickle | |
helper for pickle | |
x.__str__() <==> str(x) | |
Inherited from type | |
v defaults to None. |
Method Details |
---|
EnsureBitPimSerial(self)Ensures this entry has a serial |
GetBitPimSerial(self)Returns the BitPim serial for this item |
Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri Aug 15 18:58:23 2008 | http://epydoc.sf.net |