[Zope-dev] Basic hassle with manage_changeProperties

Florent Guillaume fg@nuxeo.com
Wed, 9 Apr 2003 16:44:47 +0200


In article <3E941E76.70705@upfrontsystems.co.za> you write:
>      def manage_changeProperties(self, REQUEST=None, **kw):
> 
> and the docstring promises:
> 
>      Change object properties by passing either a mapping object
>      of name:value pairs {'foo':6} or passing name=value parameters
> 
> However, if you call something.manage_changeProperties({a:b}),
> then REQUEST will be {a:b} and the final check in
> manage_changeProperties will be true, and manage_propertiesForm
> will be returned:
[...]
> Either Zope-2.6.1-src/lib/python/OFS/PropertyManager.py should
> be taught to distinguish between {a:b} and REQUEST, or the
> docstring should be changed to:
> 
>      Change object properties by passing either the REQUEST,
>      or passing name=value parameters
> 
> Should I file an issue for this?

Yes please. That's mainly a documentation issue.
It's always possible to call
  something.manage_changeProperties(**{a:b})
in any case.

Florent



-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com