473,387 Members | 1,326 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,387 software developers and data experts.

Limits on number of classes?

My design reqires hundreds of classes, maybe over a thousand. Can
Python handle that? Will there be a speed hit? Just wondering if
anyone had hit the limits of Python.
Jul 18 '05 #1
2 986
"Kamilche" <kl*******@home.com> wrote in message
news:88**************************@posting.google.c om...
My design reqires hundreds of classes, maybe over a thousand. Can
Python handle that? Will there be a speed hit? Just wondering if
anyone had hit the limits of Python.


Classes are first class objects like everything else. The only
limit on number of classes is the amount of memory - just
like everything else. That said, class objects are quite large
as such things go.

As far as performance goes, very deep inheritance structures
might take a bit of a performance hit since it has to check the
MRO on accesses.

John Roth
Jul 18 '05 #2
>>>>> "Kamilche" == Kamilche <kl*******@home.com> writes:

Kamilche> My design reqires hundreds of classes, maybe over a
Kamilche> thousand. Can Python handle that? Will there be a speed
Kamilche> hit? Just wondering if anyone had hit the limits of

Never heard of such a problem. Here's a little script that creates
10000 classes; doesn't seem to strain python
for i in range(10000):
exec('class C%d: pass'%i)

c = C1234()
c.x = 1
print c.x


Jul 18 '05 #3

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

Similar topics

0
by: Randall Sell | last post by:
Hello all, I am migrating a Paradox application to SQL Server. My problem is that the existing Paradox table structure is limited. Correcting it will mean a re-write of the application (Delphi...
37
by: Carol Depore | last post by:
How do I determine the maximum array size? For example, int a works, but a does not (run time error). Thank you.
11
by: O.R.Senthil Kumaran | last post by:
Hi all, I am trying with the following Question: Q: Consider a function which, for a given whole number n, returns the number of ones required when writing out all numbers between 0 and n. For...
9
by: Nathan Sokalski | last post by:
I have several TextBoxes with TextMode="MultiLine" in which I want to limit the number of characters that can be entered using a RegularExpressionValidator. I have come up with the following...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.