474,116 Members | 3,478 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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*****@megalin k.net
Jul 18 '05 #1
2 2258
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
testdrivendevel opment 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.logil ab.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
testdrivendevel opment 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*****@megalin k.net
Jul 18 '05 #3

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

Similar topics

21
43185
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 (or would HDD be better, or both?) and put that info into VB prog so the program won't work on another computer. My program uses an MSAccess table. Much appreciated if you can help! Thanks
1
1358
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 be dispatched to the corresponding child class. Somewhat silly example: class Address: def __init__(): self.displayed_name = ''
0
3027
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 mysql_error(). This occurs even if the statements are closed after each use. >How-To-Repeat: The following program highlights the problem. Just change the connection details to some database. It also assumes there is a table called dummy,
9
2660
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 is a maximum value the operator has to accept. Since the programm should accept almost any number of integers, I am not sure if this limit will be enough. Also I would like to know the same about the STL-Vector class, since I haven't decided...
2
28653
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
9632
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 application, stress test shows that setting it to 2 gives a better performance result. In other words, web garden helps. My first question is if it helps to set a number larger than the number of processors in the server. Are they related at all? ...
11
13446
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
5184
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: 65,535. But i'm trying to write a program to test this, assuming I didn't know this number in advance. I came up with the following but have two questions. Maybe someone can help? using System; using System.Collections.Generic; using System.Text;
6
10765
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 = m_vScrollBar.Maximum; The scroll bar is set to start from the bottom.
0
10487
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
12376
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11749
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
12389
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
11278
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8894
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
8055
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
7031
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
4175
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.