Nick Coghlan added the comment: I've retitled this issue to be specifically about reducing the memory consumption of the existing types in the IP Address module, as that's a change that isn't easily implemented externally, and shouldn't have any negative side effects under intended usage (although we should probably consider keeping __weakref__ support when adding the __slots__ definitions - I'm OK with taking away arbitrary attribute support, but far more wary of removing the existing weakref support)
By contrast, interning for even more aggressive memory usage reduction is something that can be implemented relatively easily externally, and is also something that is really hard to tune in the general case. "Small integers" and "strings that look like identifiers" are a win because of the way the language itself works, but there's no similar general purpose heuristic that applies for caching of IP addresses. ---------- title: ipaddress should be Flyweight -> Reduce memory usage for ipaddress object instances _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23103> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com