Changeset 120

Show
Ignore:
Timestamp:
05/17/05 02:36:19 (4 years ago)
Author:
athomas
Message:

Nothing major.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • fwc/trunk/fwc

    r119 r120  
    467467                                        lambda ctx, token: re.match(Object.TYPE_PATTERNS[ctx['type']], token) or token in help_object(ctx, ctx['type']) : { 
    468468                                                ORDER : 20, 
    469                                                 GROUP : 10
     469                                                GROUP : (10, 'Add ...')
    470470                                                VAR : 'value', 
    471471                                                HELP : lambda ctx: [(k, v) for k, v in help_network(ctx).iteritems() if 'value' in ctx and k not in tolist(ctx['value']) or 'value' not in ctx], 
  • fwc/trunk/Object.py

    r118 r120  
     1from util import tolist 
     2 
    13class Object: 
    24        # Types 
     
    1921 
    2022        def __init__(self, type, name, value, description = ""): 
    21                 self.name = name 
     23                self.name = str(name) 
    2224                self.value = value 
    23                 self.type = type 
     25                self.type = str(type) 
    2426                self.description = description 
     27 
     28        def __str__(self): 
     29                return "%s %s %s%s" % (self.type, self.name, ' '.join(map(str, tolist(self.value))), self.description and ' description ' + repr(self.description) or '') 
    2530 
    2631        def __repr__(self):