[Zope] Using builtin "type" function in a Python FS product
Chris Beaven
chris at d-designz.co.nz
Tue Oct 14 23:57:55 EDT 2003
if you're talking about using it in a Python Script, you want to use
same_type - type is supposedly a security risk for some reason...
http://www.zopelabs.com/cookbook/995873707
Gilles Lenfant wrote:
>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
>
>
>
>_______________________________________________
>Zope maillist - Zope at zope.org
>http://mail.zope.org/mailman/listinfo/zope
>** No cross posts or HTML encoding! **
>(Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
>
>
More information about the Zope
mailing list