[Zope3-dev] Schema Field Names

Martijn Faassen faassen@vet.uu.nl
Sun, 14 Jul 2002 23:24:33 +0200


Stephan Richter wrote:
> > That seems bad, as Python 2.2 is using int, str, and 2.3 will have bool.
> > This is why I used those field names.
> 
> Well, but Schemas are not required to be that Python-specific. I talked to at 
> least 5 people over the weekend (E-mail and IRC) which were all in favor of 
> the long names. Therefore I changed them.

And you didn't stop to consider why it was done this way in the first place?

> Furthermore, our style guide explicitely states that full names are required. 
> Even Jim had to adjust his coding habbits. If you want to make a change to 
> the Style Guide, please make a proposal online (Wiki or E-mail).

So while Python is moving away from the long names for these things
(types module used less in favor of the built-ins), you want to go back
to that situation again. If you want to use this outside of Python, you
can easily make a mapping to whatever naming you want (say in XML), but I 
don't want to burden Python programmers with having to remember "Oh, this is
'String' here, not 'Str' each time they use Schema" (and Dictionary
not Dict, and Boolean not Bool, and Integer not Int).

> For now I would like to change the names back to the full spelling.

Let's talk about it then. For now I changed them back again to the original
spelling, which was there for a *reason*. You've seen my code before, and
you know I generally use long names myself.

> > > Also, the guy who tries to maintain the style guide has a bias towards
> > > full names! ;-)
> >
> > The guy who tries to maintain Python has a bias towards the other names,
> > so I was following suit. It's far easier on anyone to just have a single
> > naming convention for these beasties, and since Python already has one..
> 
> I disagree. It is worse breaking the Zope style guide. Guido read and knows 
> about this style guide. I know Python uses other conventions than Zope, but 
> Zope is not Python.

I disagree -- it's worse confusing a Python programmer with another naming
convention in this case. Following a style guide is good, except when it's
not. In my opinion, this is a case of 'not'. Python naming overrides
Zope's naming (or do you want to go rewrite the python standard library
as well?).

Regards,

Martijn