Re: pylint -- should I just ignore it sometimes?

On 2010-10-19, Martin P. Hellwig <martin.hellwig@xxxxxxxxxxx> wrote:
Well, as with all styles IMHO, if there is a _good_ reason to break it,
then by all means do, but you might want to consider putting in a
comment why you did that and add the #pylint: disable-msg=<message_id>
on that line. If that is overkill, why not just comply to the standard
and avoid all the fuzz?

Well, part of what I'm trying to understand is why the standard in question
says what it says. I'm pretty much mystified by a claim that something with
seven instance attributes is "too complicated". For instance, I've got a
class which represents (approximately) a C function, for use in writing
various wrappers related to it. It has name, return type, args, default
values, a list of arguments which need various modifications, a default
return value, and so on... And it ends up with, apparently, 10 instance

I can't tell whether there's actually a general consensus that classes
should never be nearly that complicated, or whether pylint is being a little
dogmatic here -- I haven't seen enough other Python to be sure. I'm
used to having objects with anywhere from two or three to a dozen or more
attributes, depending on what kind of thing they model. It seems like a
very odd measure of complexity; is it really that unusual for objects to have
more than seven meaningful attributes?

Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam@xxxxxxxxx <-- lawsuits, religion, and funny pictures <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.

Relevant Pages

  • Re: CD-RW Formatting
    ... ISO Standard writing is done with a CD burning application (Nero or Easy ... ONLY UDF writing involves "formatting" the CD AT ALL. ...
  • Re: [OT] Geography lesson
    ... pretty much as soon as Windows hit the scene. ... all that to a new level, where writing compliant code meant you were ... they simply don't support the standard correctly and so it is ... Firefox isn't broken in Firefox on my machine. ...
  • Re: RFC: replace vm_offset_t with uintptr_t and vm_size_t with size_t
    ... format string, replacing %I with the appropriate Standard format, and ... and use %j and require all integer args to be of type intmax_t. ... literal format string that wants rewriting for all args, ... you can do that for ordinary printf() too. ...
  • Re: is this stadard C?
    ... >The thing I had never seen was a third arg to the main function. ... >thought main either took no args or 2 args. ... since defining it in any way other than ... frees the compiler from the requirements placed on it by the standard ...
  • Re: help
    ... > after I saw this post of his I couldn't stand it anymore and started ... > writing my own portable bignum code in standard C. I'm proud to announce ...