Changeset 3780:f484c8e99e5e in livinglogic.python.xist

Show
Ignore:
Timestamp:
05/10/09 18:57:32 (10 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Add support for color objects in type().

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • src/ll/ul4c.py

    r3778 r3780  
    25902590    elif hasattr(obj, "__call__"): 
    25912591        return u"template" 
     2592    elif isinstance(obj, color.Color): 
     2593        return u"color" 
    25922594    return None 
  • test/test_ul4.py

    r3776 r3780  
    944944    check("dict", code, x={1: 2}) 
    945945    check("template", code, x=ul4c.compile("")) 
     946    check("color", code, x=color.red) 
    946947    check("", code, x=1j) 
    947948