[Zope-dev] Re: You can always document...
yuppie
y.2006_ at wcm-solutions.de
Thu Jun 15 06:04:20 EDT 2006
Hi Chris!
Chris Withers wrote:
> yuppie wrote:
>>> I believe the Hippocratic Oath should be followed in subjective cases
>>> like this. "First, do no harm."
>>
>> Cruft does harm. It discourages people who want to understand and
>> improve Zope. And it encourages people to stick to bad coding habits.
>
> As far as "methods" goes, I call bullshit on this. Simple documentation
> of what "methods" is used for probably would have sufficed...
This is how 'methods' is documented in OFS.Application::
# Look for an 'initialize' method in the product. If it does
# not exist, then this is an old product that has never been
# updated. In that case, we will analyze the product and
# build up enough information to do initialization manually.
[...]
# Support old-style product metadata. Older products may
# define attributes to name their permissions, meta_types,
# constructors, etc.
[followed by the code that interprets the 'methods' attribute]
So 'methods' is BBB code for constructors. Other use cases might work,
but they were never officially supported. Note that using 'methods' was
already 'old-style' 6 years ago.
>> Why do you want to have special support for monkey patching Folder?
>> Which use cases justify to pollute the Folder API in that way?
>
> This is Zope 2, namespace polution is _not_ something that's going to
> get fixed...
There were many attempts to fix this and the pollution would be much
worse without those attempts. 'methods' was replaced by 'registerClass'
to give constructors their own namespace: manage_addProduct.
Cheers,
Yuppie
More information about the Zope-Dev
mailing list