Skip to content

Commit ac26946

Browse files
committed
Use tuple instead of list in IpRange._cast()
1 parent bb0a82d commit ac26946

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

iptools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def __hash__(self):
243243
def _cast(self, item):
244244
if isinstance(item, basestring):
245245
item = _address2long(item)
246-
if type(item) not in [type(1), type(ipv4.MAX_IP), type(ipv6.MAX_IP)]:
246+
if type(item) not in (type(1), type(ipv4.MAX_IP), type(ipv6.MAX_IP)):
247247
raise TypeError(
248248
"expected ip address, 32-bit integer or 128-bit integer")
249249

0 commit comments

Comments
 (0)