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

2004-03-17 Thread Andreas Jung
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
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


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

2004-03-17 Thread Chris Withers
Andreas Jung wrote:

This behaviour is confusing if you are not aware of it. At least the 
documentation of PythonScripts
should be updated to reflect the differences.
So put it in the collector or do the work ;-)

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )