Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3bbcc925
Commit
3bbcc925
authored
Apr 30, 2019
by
gescheit
Committed by
Inada Naoki
Apr 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-25430: improve performance of IPNetwork.__contains__ (GH-1785)
make a compare in bit-operation manner.
parent
b0a2c0fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
Lib/ipaddress.py
Lib/ipaddress.py
+1
-2
Misc/NEWS.d/next/Library/2019-04-15-12-22-09.bpo-25430.7_8kqc.rst
...S.d/next/Library/2019-04-15-12-22-09.bpo-25430.7_8kqc.rst
+1
-0
No files found.
Lib/ipaddress.py
View file @
3bbcc925
...
...
@@ -697,8 +697,7 @@ class _BaseNetwork(_IPAddressBase):
# dealing with another address
else
:
# address
return
(
int
(
self
.
network_address
)
<=
int
(
other
.
_ip
)
<=
int
(
self
.
broadcast_address
))
return
other
.
_ip
&
self
.
netmask
.
_ip
==
self
.
network_address
.
_ip
def
overlaps
(
self
,
other
):
"""Tell if self is partly contained in other."""
...
...
Misc/NEWS.d/next/Library/2019-04-15-12-22-09.bpo-25430.7_8kqc.rst
0 → 100644
View file @
3bbcc925
improve performance of ``IPNetwork.__contains__()``
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment