[Zope] Python Methods can't "construct literal dictionaries"?

Fred Yankowski fred@ontosys.com
Sun, 28 Jan 2001 17:24:49 -0600


I'm trying to create a Python Method, using PythonMethod 0-1-7, that
validates a set of form values before updating a database.  I planned
to return any/all errors as a dictionary keyed by the errant field
name.  But statements like this in my Python Method

	input_errors = {}
	input_errors['password'] = "password must not be empty"
	...
	return input_errors

result in the following error when I try to save the change to the code:

	Error Type: Python Method Error
	Error Value: Forbidden operation STORE_SUBSCR at line 3

What's up with that?  I can't create dictionaries in Python Methods?
I must be missing something.  Is there some way around this?

-- 
Fred Yankowski           fred@OntoSys.com      tel: +1.630.879.1312
Principal Consultant     www.OntoSys.com       fax: +1.630.879.1370
OntoSys, Inc             38W242 Deerpath Rd, Batavia, IL 60510, USA