Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35882 > unrolled thread
| Started by | someone <newsboost@gmail.com> |
|---|---|
| First post | 2013-01-01 12:00 +0100 |
| Last post | 2013-01-02 00:56 +0100 |
| Articles | 20 on this page of 60 — 15 participants |
Back to article view | Back to comp.lang.python
pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-01 12:00 +0100
Re: pygame - importing GL - very bad... Chris Angelico <rosuav@gmail.com> - 2013-01-01 22:13 +1100
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 00:49 +0100
Re: pygame - importing GL - very bad... Michael Torrie <torriem@gmail.com> - 2013-01-02 14:57 -0700
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 02:53 +0100
Re: pygame - importing GL - very bad... "Mike C. Fletcher" <mcfletch@vrplumber.com> - 2013-01-03 09:09 -0500
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 02:10 +0100
Re: pygame - importing GL - very bad... Dave Angel <d@davea.name> - 2013-01-04 20:30 -0500
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 11:49 +0100
Re: pygame - importing GL - very bad... Dave Angel <d@davea.name> - 2013-01-05 06:23 -0500
Re: pygame - importing GL - very bad... Chris Angelico <rosuav@gmail.com> - 2013-01-05 22:47 +1100
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 14:06 +0100
Re: pygame - importing GL - very bad... Chris Angelico <rosuav@gmail.com> - 2013-01-06 00:27 +1100
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 20:49 +0100
Re: pygame - importing GL - very bad... alex23 <wuwei23@gmail.com> - 2013-01-06 03:37 -0800
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-06 13:46 +0100
Re: pygame - importing GL - very bad... Andrew Berg <bahamutzero8825@gmail.com> - 2013-01-02 16:30 -0600
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 03:02 +0100
Re: pygame - importing GL - very bad... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-01 11:49 +0000
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 00:49 +0100
Re: pygame - importing GL - very bad... Nobody <nobody@nowhere.com> - 2013-01-02 03:01 +0000
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 04:43 +0100
Re: pygame - importing GL - very bad... alex23 <wuwei23@gmail.com> - 2013-01-02 01:52 -0800
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 15:04 +0100
Re: pygame - importing GL - very bad... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-02 07:39 +0000
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 15:06 +0100
Re: pygame - importing GL - very bad... Peter Otten <__peter__@web.de> - 2013-01-01 13:56 +0100
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 00:50 +0100
pylint, was Re: pygame - importing GL - very bad... Peter Otten <__peter__@web.de> - 2013-01-02 13:07 +0100
Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 15:09 +0100
Re: pylint, was Re: pygame - importing GL - very bad... Dave Angel <d@davea.name> - 2013-01-02 09:26 -0500
Re: pylint, was Re: pygame - importing GL - very bad... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-02 23:52 +0000
Re: pylint, was Re: pygame - importing GL - very bad... Ian Kelly <ian.g.kelly@gmail.com> - 2013-01-02 17:25 -0700
Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 03:24 +0100
Re: pylint, was Re: pygame - importing GL - very bad... Terry Reedy <tjreedy@udel.edu> - 2013-01-02 21:48 -0500
Re: pylint, was Re: pygame - importing GL - very bad... Ian Kelly <ian.g.kelly@gmail.com> - 2013-01-02 19:55 -0700
Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 12:19 +0100
Re: pylint, was Re: pygame - importing GL - very bad... Chris Angelico <rosuav@gmail.com> - 2013-01-03 22:27 +1100
Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 02:11 +0100
Re: pylint, was Re: pygame - importing GL - very bad... Jan Riechers <janpeterr@freenet.de> - 2013-01-05 14:49 +0200
Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 14:09 +0100
Re: pylint, was Re: pygame - importing GL - very bad... Ben Finney <ben+python@benfinney.id.au> - 2013-01-03 17:01 +1100
Re: pylint, was Re: pygame - importing GL - very bad... Chris Rebert <clp2@rebertia.com> - 2013-01-02 22:33 -0800
Re: pylint, was Re: pygame - importing GL - very bad... Peter Otten <__peter__@web.de> - 2013-01-03 10:00 +0100
Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 12:21 +0100
Regular expression syntax, was Re: pylint, was Re: pygame - importing GL - very bad... Peter Otten <__peter__@web.de> - 2013-01-03 12:39 +0100
Re: Regular expression syntax, was Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 02:12 +0100
Re: pylint, was Re: pygame - importing GL - very bad... "Mike C. Fletcher" <mcfletch@vrplumber.com> - 2013-01-03 09:19 -0500
Re: pylint, was Re: pygame - importing GL - very bad... Terry Reedy <tjreedy@udel.edu> - 2013-01-03 11:52 -0500
Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 02:14 +0100
Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 03:06 +0100
Re: pylint, was Re: pygame - importing GL - very bad... Chris Angelico <rosuav@gmail.com> - 2013-01-03 01:32 +1100
Re: pylint, was Re: pygame - importing GL - very bad... Ian Kelly <ian.g.kelly@gmail.com> - 2013-01-02 10:52 -0700
Re: pylint, was Re: pygame - importing GL - very bad... Chris Angelico <rosuav@gmail.com> - 2013-01-03 04:57 +1100
Re: pylint, was Re: pygame - importing GL - very bad... Ian Kelly <ian.g.kelly@gmail.com> - 2013-01-02 12:31 -0700
Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 03:31 +0100
Re: pylint, was Re: pygame - importing GL - very bad... Dave Angel <d@davea.name> - 2013-01-02 21:56 -0500
Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 02:23 +0100
Re: pygame - importing GL - very bad... alex23 <wuwei23@gmail.com> - 2013-01-01 14:39 -0800
Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 00:56 +0100
Page 3 of 3 — ← Prev page 1 2 [3]
| From | someone <newsboost@gmail.com> |
|---|---|
| Date | 2013-01-05 14:09 +0100 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <kc98ml$33s$1@dont-email.me> |
| In reply to | #36164 |
On 01/05/2013 01:49 PM, Jan Riechers wrote:
> On 05.01.2013 03:11, someone wrote:
> But about the regular expressions (a bit deeper look into that):
> Like said of Chris:
>
> [a-z]
> defines a "catching group", in this case all ascii lowercase letters
> ranging from "a" to "z". If noting else is provided, the rule matches
> one letter if there is no range defined by something like:
> {} -> Target a range of a match/hit
>
> There are also a
> ? -> Lazy match
> * -> Gready match
>
> [A-Z][0-9]{1,3} means translated:
> Look for any uppercase letter in ascii(!) (not "öäü" or similiar)
> ranging from "A" to "Z".
>
> Now look for any digit (2nd catching group) with the addition to satisfy
> the rule ONLY if there are at least 1 to 3 digits found.
> Note: If there are 4 or more digits - the catching rule is still
> satisfied and will provide a match/hit.
Ok, thanks a lot for the elaboration... I think I need to work with it
myself at some time to be sure of understanding it...
> If there is a follow up group, the next evaluation is gone through if
> present and so forth. If the expression is satisfied, the match is
> returned.
>
> The lazy "?" and greedy "*" matches try to satisfy, as the naming
> implies, to match as less or as much of what you have asked for.
>
> For example the regular expression is valid:
> 0* -> Look for a zero, and be greedy as of how many zeros you want match
> which might follow.
>
> Regular expressions don't have to include catching groups in order to work.
>
> But when you use them yourself somehow, its quite simple I think.
> I guess you are anyhow busy mangling with pyLint, PEP-Standards and
> pyOpenGL - so good luck with that :)
You're right - I'm a bit "overbooked" at the moment - but thanks a lot
for clarifyring this with the regexps :-)
[toc] | [prev] | [next] | [standalone]
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Date | 2013-01-03 17:01 +1100 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <mailman.21.1357192881.2939.python-list@python.org> |
| In reply to | #36021 |
Ian Kelly <ian.g.kelly@gmail.com> writes: > On Wed, Jan 2, 2013 at 7:24 PM, someone <newsboost@gmail.com> wrote: > > 1) class somethingWork: Invalid name "somethingWork" (should match > > [A-Z_][a-zA-Z0-9]+$), I'm not that good at regular exps, but I > > suppose it wants my class name to start with a capital letter ? > > Yes, PEP-8 recommends CamelCase for class names. PEP 8 discourages camelCase for names except for compatibility purposes, and recommends TitleCase for class names. -- \ “I'm having amnesia and déjà vu at the same time. I feel like | `\ I've forgotten this before sometime.” —Steven Wright | _o__) | Ben Finney
[toc] | [prev] | [next] | [standalone]
| From | Chris Rebert <clp2@rebertia.com> |
|---|---|
| Date | 2013-01-02 22:33 -0800 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <mailman.22.1357194819.2939.python-list@python.org> |
| In reply to | #36021 |
On Wed, Jan 2, 2013 at 10:01 PM, Ben Finney <ben+python@benfinney.id.au> wrote: > Ian Kelly <ian.g.kelly@gmail.com> writes: > >> On Wed, Jan 2, 2013 at 7:24 PM, someone <newsboost@gmail.com> wrote: >> > 1) class somethingWork: Invalid name "somethingWork" (should match >> > [A-Z_][a-zA-Z0-9]+$), I'm not that good at regular exps, but I >> > suppose it wants my class name to start with a capital letter ? >> >> Yes, PEP-8 recommends CamelCase for class names. > > PEP 8 discourages camelCase for names except for compatibility purposes, > and recommends TitleCase for class names. If we must quibble over meta-nomenclature... http://www.python.org/dev/peps/pep-0008/ : """ The following naming styles are commonly distinguished: [...] * CapitalizedWords (or CapWords, or CamelCase -- so named because of the bumpy look of its letters [3]). […] * mixedCase (differs from CapitalizedWords by initial lowercase character!) """ The term "TitleCase" does not make an appearance in the document. Regards, Chris
[toc] | [prev] | [next] | [standalone]
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Date | 2013-01-03 10:00 +0100 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <mailman.23.1357203636.2939.python-list@python.org> |
| In reply to | #36021 |
Terry Reedy wrote:
>> [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with an
>> underscore ?
>
> No, it allows underscores. As I read that re, 'rx', etc, do match. They
No, it's one leading letter or underscore [a-z_] plus at least two letters,
underscores or digits [a-z0-9_]{2,30}
[toc] | [prev] | [next] | [standalone]
| From | someone <newsboost@gmail.com> |
|---|---|
| Date | 2013-01-03 12:21 +0100 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <kc3pjj$r8o$2@dont-email.me> |
| In reply to | #36041 |
On 01/03/2013 10:00 AM, Peter Otten wrote:
> Terry Reedy wrote:
>
>>> [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with an
>>> underscore ?
>>
>> No, it allows underscores. As I read that re, 'rx', etc, do match. They
>
> No, it's one leading letter or underscore [a-z_] plus at least two letters,
> underscores or digits [a-z0-9_]{2,30}
Ah, [a-z0-9_]{2,30} means there should be at least two characters and
maximum 30 characters here ?
[toc] | [prev] | [next] | [standalone]
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Date | 2013-01-03 12:39 +0100 |
| Subject | Regular expression syntax, was Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <mailman.31.1357213140.2939.python-list@python.org> |
| In reply to | #36051 |
someone wrote:
> On 01/03/2013 10:00 AM, Peter Otten wrote:
>> Terry Reedy wrote:
>>
>>>> [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with
>>>> [an
>>>> underscore ?
>>>
>>> No, it allows underscores. As I read that re, 'rx', etc, do match. They
>>
>> No, it's one leading letter or underscore [a-z_] plus at least two
>> letters, underscores or digits [a-z0-9_]{2,30}
>
> Ah, [a-z0-9_]{2,30} means there should be at least two characters and
> maximum 30 characters here ?
Yes. See
http://docs.python.org/2/library/re.html#regular-expression-syntax
[toc] | [prev] | [next] | [standalone]
| From | someone <newsboost@gmail.com> |
|---|---|
| Date | 2013-01-05 02:12 +0100 |
| Subject | Re: Regular expression syntax, was Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <kc7ul5$8h1$3@dont-email.me> |
| In reply to | #36053 |
On 01/03/2013 12:39 PM, Peter Otten wrote:
> someone wrote:
>
>> On 01/03/2013 10:00 AM, Peter Otten wrote:
>>> Terry Reedy wrote:
>>>
>>>>> [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with
>>>>> [an
>>>>> underscore ?
>>>>
>>>> No, it allows underscores. As I read that re, 'rx', etc, do match. They
>>>
>>> No, it's one leading letter or underscore [a-z_] plus at least two
>>> letters, underscores or digits [a-z0-9_]{2,30}
>>
>> Ah, [a-z0-9_]{2,30} means there should be at least two characters and
>> maximum 30 characters here ?
>
> Yes. See
>
> http://docs.python.org/2/library/re.html#regular-expression-syntax
Thanks - it's on my TODO-list to learn more about how to use these
regexps...
[toc] | [prev] | [next] | [standalone]
| From | "Mike C. Fletcher" <mcfletch@vrplumber.com> |
|---|---|
| Date | 2013-01-03 09:19 -0500 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <mailman.39.1357222761.2939.python-list@python.org> |
| In reply to | #36021 |
On 13-01-02 09:48 PM, Terry Reedy wrote:
...
> 2) self.lightDone: Invalid name "lightDone" (should match
>> [a-z_][a-z0-9_]{2,30}$)
>>
>> So I can now understand that pylint doesn't like my naming convention
>> with a capital letter in the middle of the variable name, like:
>> "lightDone" = a boolean value. I suppose pylint wants me to use (a
>> little longer method) an underscore to separate words in long variable
>> names...
>
> That is more conventional in the Python community (and is in pep 8, I
> believe) but still a choice.
That seems like a improper error message from the tool. "Invalid name"
does *not* properly describe that situation. The name is *not*
"Invalid" in any sense of the word, and a "checker" that tells you it is
is creating needless false-positives. An error checker should be saying
something like:
"self.lightDone: Does not match PEP8 recommended style"
making it clear that this is *not* an error, it is a *style* related
*warning*.
HTH,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
[toc] | [prev] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2013-01-03 11:52 -0500 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <mailman.47.1357231993.2939.python-list@python.org> |
| In reply to | #36021 |
On 1/3/2013 9:19 AM, Mike C. Fletcher wrote:
> On 13-01-02 09:48 PM, Terry Reedy wrote:
> ...
>> 2) self.lightDone: Invalid name "lightDone" (should match
>>> [a-z_][a-z0-9_]{2,30}$)
>>>
>>> So I can now understand that pylint doesn't like my naming convention
>>> with a capital letter in the middle of the variable name, like:
>>> "lightDone" = a boolean value. I suppose pylint wants me to use (a
>>> little longer method) an underscore to separate words in long variable
>>> names...
>>
>> That is more conventional in the Python community (and is in pep 8, I
>> believe) but still a choice.
> That seems like a improper error message from the tool. "Invalid name"
> does *not* properly describe that situation. The name is *not*
> "Invalid" in any sense of the word, and a "checker" that tells you it is
> is creating needless false-positives. An error checker should be saying
> something like:
>
> "self.lightDone: Does not match PEP8 recommended style"
>
> making it clear that this is *not* an error, it is a *style* related
> *warning*.
I quite agree. Wanting 3 chars for attribute names is not even PEP-8
style but pylint-author style. I was really surprised at that. In that
case, 'Does not match pylint recommended style.' or even 'configured
styles'. I have not used pylint or pychecker as of yet.
--
Terry Jan Reedy
[toc] | [prev] | [next] | [standalone]
| From | someone <newsboost@gmail.com> |
|---|---|
| Date | 2013-01-05 02:14 +0100 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <kc7upg$8h1$4@dont-email.me> |
| In reply to | #36070 |
On 01/03/2013 05:52 PM, Terry Reedy wrote: >> That seems like a improper error message from the tool. "Invalid name" >> does *not* properly describe that situation. The name is *not* >> "Invalid" in any sense of the word, and a "checker" that tells you it is >> is creating needless false-positives. An error checker should be saying >> something like: >> >> "self.lightDone: Does not match PEP8 recommended style" >> >> making it clear that this is *not* an error, it is a *style* related >> *warning*. > > I quite agree. Wanting 3 chars for attribute names is not even PEP-8 > style but pylint-author style. I was really surprised at that. In that > case, 'Does not match pylint recommended style.' or even 'configured > styles'. I have not used pylint or pychecker as of yet. I agree with you all... Thanks, everyone - now I shall investigate pylint and friends in more detail on my own :-)
[toc] | [prev] | [next] | [standalone]
| From | someone <newsboost@gmail.com> |
|---|---|
| Date | 2013-01-03 03:06 +0100 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <kc2p41$7b5$1@dont-email.me> |
| In reply to | #35991 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-01-03 01:32 +1100 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <mailman.1572.1357137180.29569.python-list@python.org> |
| In reply to | #35932 |
On Wed, Jan 2, 2013 at 11:07 PM, Peter Otten <__peter__@web.de> wrote: > someone wrote: >> Another thing is that I don't understand this warning: >> >> Invalid name "original_format" (should match (([A-Z_][A-Z0-9_]*)| >> > (__.*__))$) >> >> I get it everywhere... I don't understand how it wants me to label my >> variables... Maybe I should disable this warning to get rid of it... > > pylint wants global names to be uppercase (what PEP 8 recommends for > constants) or "special" (two leading and two trailing underscores): > > THATS_OK = 42 > __thats_ok_too__ = object() > but_thats_not = "spam" Okay, I have to ask... why? Does it have an exception for names of classes? I don't like linters that enforce too much style. Catch things that might be mis-coded (like C's classic "if (x = 1)"), but don't complain about my names. They're MY business. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2013-01-02 10:52 -0700 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <mailman.1581.1357149171.29569.python-list@python.org> |
| In reply to | #35932 |
On Wed, Jan 2, 2013 at 7:32 AM, Chris Angelico <rosuav@gmail.com> wrote: > Okay, I have to ask... why? Does it have an exception for names of classes? Yes, and for module-level functions. > I don't like linters that enforce too much style. Catch things that > might be mis-coded (like C's classic "if (x = 1)"), but don't complain > about my names. They're MY business. pylint is configurable though, so you can disable any warnings you don't care about. My pylint macro has a fairly large number of -d options in it.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-01-03 04:57 +1100 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <mailman.1582.1357149434.29569.python-list@python.org> |
| In reply to | #35932 |
On Thu, Jan 3, 2013 at 4:52 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote: > On Wed, Jan 2, 2013 at 7:32 AM, Chris Angelico <rosuav@gmail.com> wrote: >> Okay, I have to ask... why? Does it have an exception for names of classes? > > Yes, and for module-level functions. Oh, okay. So the check's a lot more specific than the message implies - it applies only to non-callable module level names. I guess that's reasonable. >> I don't like linters that enforce too much style. Catch things that >> might be mis-coded (like C's classic "if (x = 1)"), but don't complain >> about my names. They're MY business. > > pylint is configurable though, so you can disable any warnings you > don't care about. My pylint macro has a fairly large number of -d > options in it. Yeah, same applies to most linters I think. You end up disagreeing with the author on half the points. Oh well. Doesn't make the tool useless, just means you need to fiddle with it to get it how you want it. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2013-01-02 12:31 -0700 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <mailman.1585.1357155151.29569.python-list@python.org> |
| In reply to | #35932 |
On Wed, Jan 2, 2013 at 10:57 AM, Chris Angelico <rosuav@gmail.com> wrote: > Yeah, same applies to most linters I think. You end up disagreeing > with the author on half the points. Oh well. Doesn't make the tool > useless, just means you need to fiddle with it to get it how you want > it. It's a lot less work to disable a check than to implement a desired check that is missing, so to me it's better that a linter do too much by default than not enough.
[toc] | [prev] | [next] | [standalone]
| From | someone <newsboost@gmail.com> |
|---|---|
| Date | 2013-01-03 03:31 +0100 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <kc2qhk$e28$1@dont-email.me> |
| In reply to | #36008 |
On 01/02/2013 08:31 PM, Ian Kelly wrote: > On Wed, Jan 2, 2013 at 10:57 AM, Chris Angelico <rosuav@gmail.com> wrote: >> Yeah, same applies to most linters I think. You end up disagreeing >> with the author on half the points. Oh well. Doesn't make the tool >> useless, just means you need to fiddle with it to get it how you want >> it. > > It's a lot less work to disable a check than to implement a desired > check that is missing, so to me it's better that a linter do too much > by default than not enough. I just started using pylint and some of the stuff it came up with is REALLY good - so I'll definately use pylint, pep8 (and friends) more in the future. And I think I'll also get to a point where I'll disable some of the checks - as one of you wrote: How I name my variables is (maybe) my own business and for instance I like a short variable name once in a while, e.g. "rx", "ry", "rz" for rotation around x- y- and z-axises and these variable names should not be changed. But can I ask you something: English is not my native language and I looked up what "linter" means - but it's not in my dictionary. What doet "linter" mean ? I don't suppose these exlanations are the same as you would give, in the context you're using? http://www.wordreference.com/definition/linter http://www.collinsdictionary.com/dictionary/american/linter http://www.merriam-webster.com/dictionary/linter ?
[toc] | [prev] | [next] | [standalone]
| From | Dave Angel <d@davea.name> |
|---|---|
| Date | 2013-01-02 21:56 -0500 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <mailman.12.1357182127.2939.python-list@python.org> |
| In reply to | #36022 |
On 01/02/2013 09:31 PM, someone wrote: > On 01/02/2013 08:31 PM, Ian Kelly wrote: >> On Wed, Jan 2, 2013 at 10:57 AM, Chris Angelico <rosuav@gmail.com> >> wrote: >>> Yeah, same applies to most linters I think. You end up disagreeing >>> with the author on half the points. Oh well. Doesn't make the tool >>> useless, just means you need to fiddle with it to get it how you want >>> it. >> >> It's a lot less work to disable a check than to implement a desired >> check that is missing, so to me it's better that a linter do too much >> by default than not enough. > > I just started using pylint and some of the stuff it came up with is > REALLY good - so I'll definately use pylint, pep8 (and friends) more > in the future. And I think I'll also get to a point where I'll disable > some of the checks - as one of you wrote: How I name my variables is > (maybe) my own business and for instance I like a short variable name > once in a while, e.g. "rx", "ry", "rz" for rotation around x- y- and > z-axises and these variable names should not be changed. > > But can I ask you something: English is not my native language and I > looked up what "linter" means - but it's not in my dictionary. What > doet "linter" mean ? > > I don't suppose these exlanations are the same as you would give, in > the context you're using? > > http://www.wordreference.com/definition/linter > http://www.collinsdictionary.com/dictionary/american/linter > http://www.merriam-webster.com/dictionary/linter > > ? > The first lint program I recall hearing of was available in the early 1980's, and was for the C language. At the time, the C language was extremely flexible (in other words, lots of ways to shoot yourself in the foot) and the compiler was mostly of the philosophy - if there's a way to make sense of the statement, generate some code, somehow. Anyway, lint made sense to me as the crud that gets mixed in with the real fabric. And a linter is a machine that identifies and removes that crud. Well, the lint program didn't remove anything, but it identified a lot of it. I didn't hear the term linter till decades later. -- DaveA
[toc] | [prev] | [next] | [standalone]
| From | someone <newsboost@gmail.com> |
|---|---|
| Date | 2013-01-05 02:23 +0100 |
| Subject | Re: pylint, was Re: pygame - importing GL - very bad... |
| Message-ID | <kc7v9p$c0m$1@dont-email.me> |
| In reply to | #36029 |
On 01/03/2013 03:56 AM, Dave Angel wrote: > The first lint program I recall hearing of was available in the early > 1980's, and was for the C language. At the time, the C language was > extremely flexible (in other words, lots of ways to shoot yourself in > the foot) and the compiler was mostly of the philosophy - if there's a > way to make sense of the statement, generate some code, somehow. > > Anyway, lint made sense to me as the crud that gets mixed in with the > real fabric. And a linter is a machine that identifies and removes that > crud. Well, the lint program didn't remove anything, but it identified > a lot of it. I didn't hear the term linter till decades later. Aah, now I understand this "lintering" and where it came from - thanks a lot! :-)
[toc] | [prev] | [next] | [standalone]
| From | alex23 <wuwei23@gmail.com> |
|---|---|
| Date | 2013-01-01 14:39 -0800 |
| Message-ID | <999ace5e-0a5f-4ce2-a496-315301e6f817@r10g2000pbd.googlegroups.com> |
| In reply to | #35882 |
On Jan 1, 9:00 pm, someone <newsbo...@gmail.com> wrote: > I can see that pygame hasn't been updated for > a long while - not many users use it? It helps if you look in the right place: pygame "Last Updated 2012-12-29": https://bitbucket.org/pygame/pygame/src pygame2: http://code.google.com/p/pgreloaded/
[toc] | [prev] | [next] | [standalone]
| From | someone <newsboost@gmail.com> |
|---|---|
| Date | 2013-01-02 00:56 +0100 |
| Message-ID | <kbvt40$pdt$1@dont-email.me> |
| In reply to | #35923 |
On 01/01/2013 11:39 PM, alex23 wrote: > On Jan 1, 9:00 pm, someone <newsbo...@gmail.com> wrote: >> I can see that pygame hasn't been updated for >> a long while - not many users use it? > > It helps if you look in the right place: > > pygame "Last Updated 2012-12-29": https://bitbucket.org/pygame/pygame/src > pygame2: http://code.google.com/p/pgreloaded/ Maybe... But if you look for stable releases here: http://www.pygame.org/download.shtml You'll find the top option: 1.9.1 Packages (August 6th 2009) And then previous releases is just below 1.9.1: pygame-1.9.0release.tar.gz ~ 1.4M - August 1, 2009 pygame-1.8.1release.tar.gz ~ 1.4M - July 30, 2008 pygame-1.8.0release.tar.gz ~ 1.4M - March 29, 2008 pygame-1.7.1release.tar.gz ~ 1.3M - August 16, 2005 1.7.0 ~ no source release was made. pygame-1.6.2.tar.bz2 ~ 1140 kb - pygame-1.6.tar.gz ~ 832 kb - October 23, 2003 pygame-1.5.tar.gz ~ 736 kb - May 30, 2002 pygame-1.4.tar.gz ~ 808 kb - Jan 30, 2002 pygame-1.3.tar.gz ~ 731 kb - Dec 19, 2001 pygame-1.2.tar.gz ~ 708 kb - Sep 4, 2001 pygame-1.1.tar.gz ~ 644 kb - Jun 23, 2001 pygame-1.0.tar.gz ~ 564 kb - Apr 5, 2001 pygame-0.9.tar.gz ~ 452 kb - Feb 13, 2001 pygame-0.5.tar.gz ~ 436 kb - Jan 6 14, 2001 pygame-0.4.tar.gz ~ 420 kb - Dec 14, 2000 pygame-0.3b.tar.gz ~ 367 kb - Nov 20, 2000 pygame-0.2b.tar.gz ~ 408 kb - Nov 3, 2000 pygame-0.1a.tar.gz ~ 300 kb - Oct 28, 2000 Back to year 2000... Maybe they should get a grip on themselves and distribute a new stable releases in year 2013 - then it would at least SEEM to look as the project is not dead. But in any case, I'm happy with it - haven't experienced any big issues with pygame yet, so don't take this as I don't value what they do. Maybe they've made a great version back in 2009 and it's so good that there wasn't any need for a newer stable version before 2013. But it gives the impression that nothing happens, when so many years pass on... Anyway, thanks a lot to all... (And sorry I accidentally replied privately to some of you - in thunderbird I should hit the "followup"-button but maybe they've removed it and instead I keep on hitting "reply" - very confusing that the first button in thunderbird is reply instead of followup, which is what I always prefer to use (so other people can see the answers). Thanks you for pointing out that (at least) something did happen on 2012-12-29, when it looks a bit dead on the official homepage.
[toc] | [prev] | [standalone]
Page 3 of 3 — ← Prev page 1 2 [3]
Back to top | Article view | comp.lang.python
csiph-web