New issue 47 by garron.moore: IPNetwork cannot be evaluated as a boolean
when it has a large size
http://code.google.com/p/netaddr/issues/detail?id=47
What steps will reproduce the problem?
1.
if IPNetwork('2002::/64'):
pass
What is the expected output? What do you see instead?
The expected output is nothing but I get a traceback. Since IPNetwork does
not implement __nonzero__(), the if statement results in the __len__()
method getting called, which for a network with this many IP addresses,
raises IndexError.
What version of the product are you using? On what operating system?
0.7.2
Please provide any additional information below.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Comment #1 on issue 47 by drkjam: IPNetwork cannot be evaluated as a
boolean when it has a large size
http://code.google.com/p/netaddr/issues/detail?id=47
Thanks. I'll take a look.
Fixed in branches/rel-0.7.x, revision 337.
Comment #3 on issue 47 by drkjam: IPNetwork cannot be evaluated as a
boolean when it has a large size
http://code.google.com/p/netaddr/issues/detail?id=47
(No comment was entered for this change.)
Wow, quick turnaround. Thanks!