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 eric.snow
Recipients eric.snow, josh.r, lemburg, ncoghlan, pmoody, r.david.murray, rhettinger, sbromberger, serhiy.storchaka
Date 2014-12-24.17:22:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1419441748.1.0.0798850527575.issue23103@psf.upfronthosting.co.za>
In-reply-to
Content
@sbromberger, there's no need for your own package.  Just use something like this:


_addr_cache = {}

def ipaddr(addr):
    try:
        return _addr_cache[addr]
    except KeyError:
        _addr_cache[addr] = ipaddress.ipaddress(addr)
        return _addr_cache[addr]


You could even throw weakrefs in there if your use case demanded it.
History
Date User Action Args
2014-12-24 17:22:28eric.snowsetrecipients: + eric.snow, lemburg, rhettinger, ncoghlan, pmoody, r.david.murray, serhiy.storchaka, josh.r, sbromberger
2014-12-24 17:22:28eric.snowsetmessageid: <1419441748.1.0.0798850527575.issue23103@psf.upfronthosting.co.za>
2014-12-24 17:22:28eric.snowlinkissue23103 messages
2014-12-24 17:22:27eric.snowcreate