]> granicus.if.org Git - python/commit
bpo-27860: use cached_property (GH-12832)
authorInada Naoki <songofacandy@gmail.com>
Mon, 15 Apr 2019 07:01:00 +0000 (16:01 +0900)
committerGitHub <noreply@github.com>
Mon, 15 Apr 2019 07:01:00 +0000 (16:01 +0900)
commit2430d532e240dea55f0082d1e9bf2e0f3d7505be
tree97438effa6641201697ae515a08baeec86acbf4f
parent3c5a858ec6a4e5851903762770fe526a46d3c351
bpo-27860: use cached_property (GH-12832)

* cached_property is more efficient than hand crafted cache.
* In IPv[46]Network, `self.network.prefixlen` is same to `self._prefixlen`.
Lib/ipaddress.py
Lib/test/test_ipaddress.py