Package teamwork :: Package examples :: Package Games :: Module PublicGood :: Class DonateAction
[hide private]
[frames] | no frames]

Class DonateAction

source code

            object --+        
                     |        
                  dict --+    
                         |    
action.PsychActions.Action --+
                             |
                            DonateAction

Domain-specific class that includes an 'amount' field.

Instance Methods [hide private]
new empty dictionary

__init__(self, arg={})
Translates an action in string form into a structured representation of that same action (e.g., 'CLF-violence-to-UrbanPoor' becomes a PsychAction object {'actor':CLF,'type':'violence','object':UrbanPoor}
source code
 
__eq__(self, other)
x==y
source code

Inherited from action.PsychActions.Action: __deepcopy__, __delitem__, __getitem__, __hash__, __setitem__, __str__, __xml__, addField, instantiate, keys, makeRange, matchTemplate, parse, simpleText

Inherited from dict: __cmp__, __contains__, __ge__, __getattribute__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, pop, popitem, setdefault, update, values

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__

Class Variables [hide private]
  format = ['actor', 'type', 'object', 'amount']

Inherited from action.PsychActions.Action: fields, nop

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, arg={})
(Constructor)

source code 

Translates an action in string form into a structured representation of that same action (e.g., 'CLF-violence-to-UrbanPoor' becomes a PsychAction object {'actor':CLF,'type':'violence','object':UrbanPoor}

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

__eq__(self, other)
(Equality operator)

source code 

x==y

Overrides: dict.__eq__
(inherited documentation)