In article <6tk9qqfbav8...@mid.uni-berlin.de>,
Marc 'BlackJack' Rintsch wrote:
>
>PEP8 doesn't mention constants at all.
Not true anymore. ;-)
--
Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/
Weinberg's Second Law: If builders built buildings the way programm
On Mon, 19 Jan 2009 05:50:54 -0800, koranthala wrote:
> Hi,
>I have some more questions about python code styling. 1. Global
>Variables: In my code, I am using some global variables.
> Now, when I ran PyLint, it raised convention errors mentioning that they
> should be CAPITAL_ALPHABETS. N
koranthala wrote:
> Hi,
>I have some more questions about python code styling.
>1. Global Variables: In my code, I am using some global variables.
> Now, when I ran PyLint, it raised convention errors mentioning that
> they should be CAPITAL_ALPHABETS. Now, in PEP 8, I did not see that
> m
Hi,
I have some more questions about python code styling.
1. Global Variables: In my code, I am using some global variables.
Now, when I ran PyLint, it raised convention errors mentioning that
they should be CAPITAL_ALPHABETS. Now, in PEP 8, I did not see that
mentioned. Please let me know wh
koranthala writes:
> import x
> b = x.a
> or
> from x import a
> b = a
>
>I read in Learning Python that it is always better to use the
> former - especially since namespace wont be dirtied.
The namespace isn't really dirtied by ‘from foo import spam’, since
it's clear within t
On Jan 16, 12:00 pm, Terry Reedy wrote:
> koranthala wrote:
> > Hi,
> > Which is more advisable?
> > import x
> > b = x.a
> > or
> > from x import a
> > b = a
>
> If I know I want just one thing from x, I tend to use latter.
> I also like 'import xyzlib as x'
>
> > I read in Lea
koranthala wrote:
Hi,
Which is more advisable?
import x
b = x.a
or
from x import a
b = a
If I know I want just one thing from x, I tend to use latter.
I also like 'import xyzlib as x'
I read in Learning Python that it is always better to use the
former - especially since na
On Thu, 15 Jan 2009 22:13:06 -0800, koranthala wrote:
> Hi,
>Which is more advisable?
> import x
> b = x.a
> or
> from x import a
> b = a
>
>I read in Learning Python that it is always better to use the
> former
Perhaps not "always", but often.
> - especially since namespa
Hi,
Which is more advisable?
import x
b = x.a
or
from x import a
b = a
I read in Learning Python that it is always better to use the
former - especially since namespace wont be dirtied. But, doing that
with PEP 8 together causes my code to look rather cluttered. Reason
being tha