type Properties
source code
object --+
|
dict --+
|
Properties
I am a special dictionary which you also can treat as an instance.
Setting and getting an attribute works. This is suitable for using in a
kiwi proxy. >>> p = Properties() >>> p.attr = 'value'
>>> p <Properties {'attr': 'value'}>
Note that you cannot insert the attributes which has the same name as
dictionary methods, such as 'keys', 'values', 'items', 'update'.
Underscores are converted to dashes when setting attributes, eg:
>>> p.this_is_outrageous = True
>>> p
<Properties {'this-is-outrageous': True}>
|
|
|
|
|
|
|
|
True if D has a key k, else False
|
|
|
|
Inherited from dict :
__cmp__ ,
__delitem__ ,
__eq__ ,
__ge__ ,
__getattribute__ ,
__getitem__ ,
__gt__ ,
__init__ ,
__iter__ ,
__le__ ,
__len__ ,
__lt__ ,
__ne__ ,
__new__ ,
__sizeof__ ,
clear ,
copy ,
fromkeys ,
get ,
has_key ,
items ,
iteritems ,
iterkeys ,
itervalues ,
keys ,
pop ,
popitem ,
setdefault ,
update ,
values ,
viewitems ,
viewkeys ,
viewvalues
|
__setitem__(self,
attr,
value)
(Index assignment operator)
| source code
|
x[i]=y
- Overrides:
dict.__setitem__
- (inherited documentation)
|
- Overrides:
object.__setattr__
- (inherited documentation)
|
- Overrides:
object.__delattr__
- (inherited documentation)
|
- Returns: True if D has a key k, else False
- Overrides:
dict.__contains__
- (inherited documentation)
|
repr(x)
- Overrides:
dict.__repr__
- (inherited documentation)
|