[Zope] Python Scripts: assignment error when namespace is bound

J M Cerqueira Esteves jmce@artenumerica.com
Tue, 27 Mar 2001 17:50:15 +0100


Greetings

I just noticed that (with Zope-2.3.1b3, Python 1.5.2, under Debian 2.2)
when namespace is bound (namespace=_) in Python Scripts, 
I can not use names accessible through the namespace as assignment targets.  
For instance, the top folder where I was testing had a string property 
named 'color_dm'.  When the following simple script was called from a DTML
Method

 color_dm = 42
 return 14

I got

   Error Type: TypeError
   Error Value: no arguments expected

This one:

 index_html = 42
 return 14

resulted in 

   Error Type: SystemError
   Error Value: Excessive recursion

with the following repeating messages:

    File /usr/local/src/Zope-2.3.1b3-src/lib/python/OFS/DTMLMethod.py, line 182, in __call__
      (Object: index_html)
    File /usr/local/src/Zope-2.3.1b3-src/lib/python/DocumentTemplate/DT_String.py, line 538, in __call__
      (Object: index_html)
    File /usr/local/src/Zope-2.3.1b3-src/lib/python/Shared/DC/Scripts/Bindings.py, line 334, in __render_with_namespace__
      (Object: serpent)


There are no problems if namespace is not bound or the script
is invoked directly in a URL (because of the resulting empty namespace,
I believe).

-- 
 jmce: +351 919838775 ~ http://artenumerica.com/ ~ http://artenumerica.org/