pylint, was Re: pygame - importing GL - very bad...
someone
newsboost at gmail.com
Wed Jan 2 21:06:56 EST 2013
On 01/02/2013 03:26 PM, Dave Angel wrote:
> On 01/02/2013 09:09 AM, someone wrote:
>> On 01/02/2013 01:07 PM, Peter Otten wrote:
>> OMG... I don't want to type those underscores everywhere... Anyway,
>> thank you very much for explaining the meaning of what it wants...
>>
>>
>>
>
> Global const values should be ALL_CAPS, so it's obvious that nobody
> intends to modify them. It's the non-const global attributes that
> expect to be underscored.
>
> You shouldn't have to use those underscores very often. After all,
> there is seldom a need for a non-const global value, right? Don't think
I suppose you're right.
> of it as a pylint problem, but as a hint from pylint that perhaps you
> should use fewer globals.
I had some bad code which I improved greatly now with thanks to pylint.
I'll remember what you've written the next time I look at it - I think I
don't use that many global non-const values now - I wrapped a lot of
things into a class now. This is much better and I guess the correct
"object-oriented" thing to do. I hope/think I'll get this warning a lot
fewer times in the future.
Thanks a lot for the explanation.
More information about the Python-list
mailing list