[Zope] Using builtin "type" function in a Python FS product

Gilles Lenfant gilles at pilotsystems.net
Tue Oct 14 15:14:31 EDT 2003


Is there changes in this usual Python builtin ?

import types

# somewhere in a method...

if type(x) == types.UnicodeType:

Raises...

Error Type: UnboundLocalError
Error Value: local variable 'type' referenced before assignment

What did I miss ?

Thanks by advance.

--Gilles





More information about the Zope mailing list