New submission from Seth Bromberger: ipaddress.ip_address instances should be flyweight. There's really no reason to make them mutable:
>>> a = ipaddress.ip_address("10.1.2.3") >>> b = ipaddress.ip_address("10.1.2.3") >>> id(a) 140066533772368 >>> id(b) 140066504622544 Especially with IPv6 and large numbers of addresses, it would be helpful not to have separate instances with the same underlying properties. ---------- components: Library (Lib) messages: 233038 nosy: Seth.Bromberger priority: normal severity: normal status: open title: ipaddress should be Flyweight type: enhancement versions: Python 3.6 _______________________________________ 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