[Zope-CMF] allowedContentTypes improvement

Charlie Clark charlie at begeistert.org
Sun Jun 28 08:35:10 EDT 2009


Am 28.06.2009, 09:46 Uhr, schrieb Vincent Fretin  
<vincent.fretin at gmail.com>:

> Hi,
> I patched Products.CMFCore trunk 2.2 as well. I hope I didn't break  
> anything.

Difficult to know as there doesn't seem to be any test for this. I think  
it would be a good idea to have one

Apart from the use of list comprehension, the change seems to be:

portal_types.listTypeInfo(self)

versus

portal_types.listTypeInfo()

Where ther is type information which leads to isConstructionAllowed()  
being called twice. The change shouldn't have any unpleasant side effects  
and is certainly easier to understand.

I would add that the changed code exceeds the recommended maxium line  
length.

Charlie
-- 
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226


More information about the Zope-CMF mailing list