[Zope-dev] use of exec in products considered harmful?

Toby Dickenson tdickenson@geminidataloggers.com
Tue, 14 Mar 2000 10:25:20 +0000


On Mon, 13 Mar 2000 12:32:05 -0800, "Jonothan Farr" <jfarr@real.com>
wrote:

>> Would something like the Brains class that can be set for SQL methods
>> do the job?
>
>Brains classes always have the same constructor arguments (namely: (self)).

That doesn't need to be true for _your_ brains classes.

>What
>makes this problem difficult is that the constructors of Zope objects which map
>to local files can have virtually any signature.

Let your brains classes __init__ take a REQUEST parameter. They can
extract the properties it needs, before calling the base class
__init__.

You need one brains class for each class that you want to wrapper. Is
this a problem?


Toby Dickenson
tdickenson@geminidataloggers.com