Limits on number of classes?

John Roth newsgroups at jhrothjr.com
Sun Jun 13 19:41:08 CEST 2004


"Kamilche" <klachemin at home.com> wrote in message
news:889cbba0.0406130859.7e2fc2da at posting.google.com...
> 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





More information about the Python-list mailing list