Is this a bug, or is it me?

cptnwillard at gmail.com cptnwillard at gmail.com
Thu Jan 17 16:05:49 CET 2008


Hello all,
For some reason, the following does not work :


class C:
    TYPES = [None]
    DICT = {}
    for Type in TYPES:
        DICT.update((E,Type) for E in [1])

>>> NameError: global name 'Type' is not defined


What do you think? Is this a bug?



More information about the Python-list mailing list