This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients josh.r, ncoghlan, pmoody, sbromberger, serhiy.storchaka
Date 2014-12-23.14:50:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1419346259.93.0.833989186719.issue23103@psf.upfronthosting.co.za>
In-reply-to
Content
IP address instances already are immutable and flyweight. There are no mutating methods. And a number of address attributes (packed, is_loopback, etc) are calculated on fly from integer representation.

But IP address objects can be lighter.

1) Use __slots__.
2) Every instance has the _version attribute. Why this is not class attribute?
3) Memory consumption can be even less if IP addresses would int subclasses. But this changes the API (in particular adds the __index__ method) and I doubt that we should do this.
History
Date User Action Args
2014-12-23 14:50:59serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, pmoody, josh.r, sbromberger
2014-12-23 14:50:59serhiy.storchakasetmessageid: <1419346259.93.0.833989186719.issue23103@psf.upfronthosting.co.za>
2014-12-23 14:50:59serhiy.storchakalinkissue23103 messages
2014-12-23 14:50:59serhiy.storchakacreate