Changeset 799 for vanHelsing/trunk/src/directive.py
- Timestamp:
- Oct 15, 2009, 6:37:56 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vanHelsing/trunk/src/directive.py
r775 r799 6 6 @author: hmueller 7 7 ''' 8 9 from resource import Resource 8 10 9 11 PrettyNames = {} … … 30 32 # 31 33 32 class Item( object):34 class Item(Resource): 33 35 def __init__(self, name, default=None, type=None, required=False): 34 36 self.name = name … … 50 52 return self.name < other.name 51 53 52 def __str__(self):53 if PrettyNames.has_key(self.name):54 return '%s = "%s"' % (self.prettyName(), str(self.value))55 else:56 return '%s = "%s" # Warning: No pretty name' % (57 self.name, str(self.value))58 54 def prettyName(self): 59 55 return PrettyNames.get(self.name, self.name)
Note:
See TracChangeset
for help on using the changeset viewer.