473,396 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Maximum Number of Class Attributes

In its default configuration, my version of pylint (0.5.0) sets the
maximum number of class attributes at 7. This seems low to me, but I
can see how an excessive number might make maintenance more
difficult. Is this indeed the best value for a maximum under ordinary
conditions? If not, can anyone suggest a more reasonable value?

Thanks in advance.

Bob Parnes

--
Bob Parnes
rp*****@megalink.net
Jul 18 '05 #1
2 2220
On Wed, 26 Jan 2005 02:03:12 +0000, Bob Parnes wrote:
In its default configuration, my version of pylint (0.5.0) sets the
maximum number of class attributes at 7. This seems low to me, but I can
see how an excessive number might make maintenance more difficult. Is this
indeed the best value for a maximum under ordinary conditions? If not, can
anyone suggest a more reasonable value?


well, this value is very subjective, and may change from one context to
another... For instance at some point I hope that pylint will detect "GUI"
classes and allow more attributes (and methods?) to those.
Anyway that's just an indicator, not a rule of thumb (and pylint itself
has some class with more than 7 attributes...).

And FYI, this value has been taken from a post to the
testdrivendevelopment at yahoogroups (as most others default values in the
"design analysis" checker). Hum, well... After checking it seems that the
post said 20 attributes. I don't remember why did i get this number down
to 7. If this discussion leads to an agreement for a better number, I
can change the default value.

--
Sylvain Thénault LOGILAB, Paris (France).

http://www.logilab.com http://www.logilab.fr http://www.logilab.org
Jul 18 '05 #2
On Wed, 26 Jan 2005 10:03:47 +0100,
Sylvain Thenault <sy**************@nospam.logilab.fr> wrote:
On Wed, 26 Jan 2005 02:03:12 +0000, Bob Parnes wrote:
In its default configuration, my version of pylint (0.5.0) sets the
maximum number of class attributes at 7. This seems low to me, but I can
see how an excessive number might make maintenance more difficult. Is this
indeed the best value for a maximum under ordinary conditions? If not, can
anyone suggest a more reasonable value?


well, this value is very subjective, and may change from one context to
another... For instance at some point I hope that pylint will detect "GUI"
classes and allow more attributes (and methods?) to those.
Anyway that's just an indicator, not a rule of thumb (and pylint itself
has some class with more than 7 attributes...).

And FYI, this value has been taken from a post to the
testdrivendevelopment at yahoogroups (as most others default values in the
"design analysis" checker). Hum, well... After checking it seems that the
post said 20 attributes. I don't remember why did i get this number down
to 7. If this discussion leads to an agreement for a better number, I
can change the default value.

--
Sylvain Thénault LOGILAB, Paris (France).

http://www.logilab.com http://www.logilab.fr http://www.logilab.org


Thanks for the information. I *am* using gui classes.

--
Bob Parnes
rp*****@megalink.net
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Gavin | last post by:
Hi, I'm a newbie to programming of any kind. I have posted this to other groups in a hope to get a response from anyone. Can any one tell me how to make my VB program read the Bios serial number...
1
by: Dave Merrill | last post by:
Python newb here. Say a class contains some rich attributes, each defined as a class. If an instance of the parent class recieves a call to a method belonging to one of those attributes, it should...
0
by: David.Tymon | last post by:
>Description: MySQL v4.1.0-alpha only allows a client to prepare a maximum of 254 statements. On the 255th mysql_prepare() call, a failure is returned with no information returned by...
9
by: Till Crueger | last post by:
Hi, I have to implement some simple sorting algorithm. I am NOT asking for you to do my homework, but my question is rather on how to store the integers. I recall reading once in here that there...
2
by: Kums | last post by:
What is the maximum permissible size of a database? Is there any limitation. What is the maximum # of tablespace's allowed in a database? Thanks for your response.
1
by: Dominic | last post by:
I'd like to tune the performance of my application in a web garden. Our server has dual processors. Is there any guideline to set this "maximum number of worker processes" for web garden? In my...
11
by: Leroy | last post by:
Hello, I have a question regarding the maximum number of parameters that can be passed to a procedure. In VB 6 the max was 60. What is the max for Dot Net? please and thanks.
29
by: garyusenet | last post by:
I'm trying to investigate the maximum size of different variable types. I'm using INT as my starting variable for exploration. I know that the maximum number that the int variable can take is:...
6
by: =?Utf-8?B?U2hhcm9u?= | last post by:
I'm using the VScrollBar and set it as follow: m_vScrollBar.Minimum = -19602; m_vScrollBar.Maximum = 0; m_vScrollBar.SmallChange = 1; m_vScrollBar.LargeChange = 1089; m_vScrollBar.Value =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.