[mod_python] newbie

Gregory (Grisha) Trubetskoy grisha at modpython.org
Fri Dec 19 23:13:26 EST 2003


I think Russel was referring not to the "from" but to the "*" - I agree,
Python would probably be better if this "feature" did not exist at all,
because you don't know what the "*" has just imported.

Using "from" is just fine though :-)

On Fri, 19 Dec 2003, Kevin Ballard wrote:

> For the record, I meant to say
>
> from mod_python import apache
>
> because what I wrote wouldn't actually run.
>
> And although I tend to agree with you in general, I still prefer
> importing apache from mod_python rather than just importing mod_python.
>
> On Dec 19, 2003, at 3:51 PM, Russell Nelson wrote:
>
> > Kevin Ballard writes:
> >> What's your mptest.py look like?
> >>
> >> Most likely, it's something like
> >>
> >> from apache import *
> >
> > Just as a matter of style, I think Guido (BDFL) discourages this sort
> > of thing.  For myself, even though it means more typing in the first
> > place, I prefer to see a plain import, and lots of foo., bar., and
> > baz. prefixes.  Lets the newbie (which I've been so very recently)
> > know which module the function is associated with.
>
> --
> Kevin Ballard
> kevin at sb.org
> http://www.tildesoft.com
> http://kevin.sb.org
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list