noob import question
fredrik at pythonware.com
Fri May 19 16:07:34 CEST 2006
"PA" <petite.abeille at gmail.com> wrote:
> Restrictive or not, what's so fundamentally devious in putting a class
> declaration in a separate file whose name is that of the declared class
> (class Queue -> Queue.py)?
> Sounds like a handy way of organizing your code, no?
sure, if you prefer to do things that way.
the Python style guide (PEP 8) used to recommend naming a module that con-
tains only one class (plus support factories and other functions) after the class,
but now recommends using other names for the module, to avoid confusion.
for some reason, some people seem to treat the latest edition of each PEP as
a divine truth, and all earlier editions as works of the devil. I guess they reset
their brain before each svn update.
More information about the Python-list