News for hackers. Stuff that matters.
Re:Google's Python style guide by oddthink on Thursday April 19, 2012 @08:54AM (#3862698)
I find it's easier to have short names, defined at the beginning, rather than clogging up my code with full.path.to.a.module. I imagine preferences vary.

What I don't understand is why they prefer:

    from thepackage.subpackage import amodule
over

    import thepackage.subpackage.amodule as amodule
I always found the second to be more clear, since it doesn't mix the idea of package-resolution with the idea of picking-things-out-of-a-module. On the down side, I end up typing "amodule" twice.

There are no comments on this comment yet.