[Zope-dev] built-in 'dict' and 'list' in PythonScripts

Andreas Jung lists at andreas-jung.com
Wed Mar 17 04:10:07 EST 2004


The built-ins 'dict' and 'list' are not what they supposed to be in a 
Python environment:

print isinstance('foo', dict)
return printed

will raise a TypeError because 'dict' represents an instance of 
ZopeGuards.GuardedDictType.

This behaviour is confusing if you are not aware of it. At least the 
documentation of PythonScripts
should be updated to reflect the differences.

-aj
-- 

Andreas Jung
--------------------------------
www.zopyx.com Software-Entwicklung und Consulting Andreas Jung



More information about the Zope-Dev mailing list