[ZODB-Dev] ZODB4 Question and perhaps foolish suggestion

Steve Alexander steve@cat-box.net
Fri, 10 Jan 2003 12:54:36 +0000


Jeff Sasmor wrote:
> I just upgraded my project to the current ZODB and I'm delighted to
> say that while I can't tell if the ZODB works any better (yet), it
> 'just worked' as it did before after dropping it in.
> 
> Looking forward to ZODB 4, I downloaded it and after poking around in
> it for a while found that it's missing something that is in the current
> ZODB, namely, Acquisition: __of__ and all that implies.  
> Unfortunately for me, perhaps, I use it. 

You'll be wanting the ContextWrapper stuff from Zope 3.


> Also, might it not be a good idea to change all function/method arguments 
> and other variables with the name 'object' as it may lead to confusion, if not
> now perhaps in the future?  object is in __builtin__ after all.

Personally, I'm fine with using 'object' and 'type' as variables when I 
really want to use those terms as descriptive nouns, rather than as the 
python builtins. Most times I've seen this, it is unambiguous what is 
meant. Where it has been in the least bit ambiguous, I've changed the 
variable name.


> Just doing a global s/r on object->obj would retain readability and remove
> this (perhaps in my own head) problem.

That would be likely to introduce bugs where you want 'object' to be the 
builtin object type, or there are other words including 'object'.

Then again, perhaps you didn't intend to be taken literally ;-)

--
Steve Alexander