Learning inheritance

Niklasro niklasro at gmail.com
Sun Sep 19 04:18:44 EDT 2010


On Sep 19, 8:12 am, Thomas Jollans <tho... at jollans.com> wrote:
> On 2010-09-19 09:22, Niklasro wrote:> util.py:
> > url = os.environ.get("HTTP_HOST", os.environ["SERVER_NAME"]) #declared
> > as class variable(?)
>
> There is no class here, so this is no class variable, and you're not
> inheriting anything. You're simply using a module.
>
> > And viola just test if util.url.find('niklas') > 0:
>
> > Exactly what I wanted to do with your experienced guidance.
>
> > Many thanks
> > Happy refactored
>
>
Good to learn what I'm doing :-) since important being able to explain
choices taken farther than "doing it because it works".
I understand the concept of modules may not correspond to java
programming where I come from.
Sincerely with thanks for the help,
Niklas



More information about the Python-list mailing list