[Zope] RE: Forbidden Variable Names

Jim Penny jpenny@universal-fasteners.com
Tue, 26 Mar 2002 12:04:57 -0500


On Tue, Mar 26, 2002 at 09:50:18AM -0500, Chris McDonough wrote:
> Ren,
> 
> Would you be able to submit the bug's symptom and your solution to the
> Collector at http://collector.zope.org ?  That way it has a chance of
> getting fixed.
> 
> Thanks!
> 
> - C

Actually, it is kind of interesting that this bug is being exercised at
all.  "client" is not a string in lib/python/Products/ZSQL/*.py,
lib/python/Products/ZSQL/*/*, lib/python/Shared/DC/ZRDB/*.py, or
lib/python/Shared/DC/*/*.  So, where is it being defined?

On the other hand, if you define a dtml method that has only contents
<dtml-var client>, a name space violation is raised, suggesting that it
is not a part of normal acquisition.

Jim Penny

> 
> 
> ----- Original Message -----
> From: "Ren Bing" <bing.ren@eastip.com>
> To: "Roger Erens" <rerens@dela.org>
> Cc: <zope@zope.org>
> Sent: Tuesday, March 26, 2002 4:02 AM
> Subject: [Zope] RE: Forbidden Variable Names
> 
> 
> > Hi, Roger:
> >
> > Thanks. I agree, a whole morning is not that bad.
> > But the point is the name is "client" but not "id", I know "id" should be
> > avoid of, but who expects "client"? And the most important is that,
> there's
> > nowhere mentioned "client", and supposely explicitly specified argument or
> > variable should override other thing except reserved keyword of python
> > language, is that right? OK, I checked python documentation, "client" is
> not
> > a reserved keyword.
> >
> > My understanding is that something named "client" is used in the same
> > namespace, if this is some internal one and must reside in the same space
> > with arguments, it should be renamed to "__client__" for better.
> >
> > Anyway, I am grateful for guys who brings Zope out. It's true flexible and
> > amazing :-) I wish this bug fixed ASAP.
> >
> > Thanks
> >
> > Ren Bing
> >
> > -----Original Message-----
> > From: Roger Erens [mailto:rerens@dela.org]
> > Sent: Tuesday, March 26, 2002 4:49 PM
> > To: 'Ren Bing'
> > Cc: 'zope@zope.org'
> > Subject: Forbidden Variable Names
> >
> >
> > Hi Bing,
> >
> > > Dear all:
> > >
> > > A bug in Z SQL method wasted my whole precious morning! Write
> >
> > That's what bugs are supposed to do, if not wasting whole precious days!
> >
> > > replaced argument name "client" to "clientname" , then
> > > everything is fine.
> > >
> > > Woo, but WHY???? what's inside this? I didn't read this at
> > > anywhere. Is
> > > there still more like this ahead?
> >
> > Apparently "client" is something like a reserved variable/keyword, and
> you'd
> > better not use these words for your own variables. Same case for "id" and
> > probably many more variable names.
> >
> > It would be nice indeed to have a list somewhere on zope.org or in the
> book
> > with 'forbidden variable names'. (Debugger: Aiieeee! "client" is an FVN!)
> >
> > Enjoy the remaining of your afternoon,
> >
> > Roger
> >
> >
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> >
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>