What am I missing? (this is from 2.4b1, so probably it has been fixed?)

def flatten(list):
    l = []
    for elt in list:
               ^^^^--must be expecting list instance or other sequence
        t = type(elt)
        if t is tuple or t is list:
                              ^^^^--looks like it expects to refer to the type, 
not the arg
            for elt2 in flatten(elt):
                l.append(elt2)
        else:
            l.append(elt)
    return l


Regards,
Bengt Richter
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to