[Tutor] Python OO

Juan C. juan0christian at gmail.com
Sun Mar 29 19:30:23 CEST 2015


On Sun, Mar 29, 2015 at 3:56 AM Ben Finney <ben+python at benfinney.id.au>
wrote:
As a side issue: You apparently intend to choose names that are English
language.

If that's true, you should know that “actor”, “movie”, “series” are all
singular.

My bad, it's series indeed.


On Sun, Mar 29, 2015 at 10:33 AM Dave Angel <davea at davea.name> wrote:
I'd suggest that you NEVER call a module __main__.py The name
"__main__" is reserved for identifying the script file, and is faked
during the program initialization.

By using that name for an imported file, you could get some very
confusing errors later.

As Peter said, I'm using __main__.py so that I can invoke the the app like
'python pycinema' in the console. A bunch of people recommend this approach.


On Sun, Mar 29, 2015 at 11:31 AM Mark Lawrence <breamoreboy at yahoo.co.uk>
wrote:
No.

We're talking Python, not Java. Some modules run to 1000s of lines, a
couple of hundred is just peanuts.

Ok, so you recommend me to have only 2 modules? One for the MDB API and one
for the app inside the pycinema package and then my __main__.py on the
folder root?


More information about the Tutor mailing list