17 lines
517 B
Text
17 lines
517 B
Text
|
--- IPy.py.orig Mon Dec 14 13:28:56 2015
|
||
|
+++ IPy.py Mon Dec 14 13:44:43 2015
|
||
|
@@ -558,6 +558,13 @@ class IPint(object):
|
||
|
"""
|
||
|
return True
|
||
|
|
||
|
+ def __bool__(self):
|
||
|
+ """All IPy objects should evaluate to true in boolean context.
|
||
|
+ Ordinarily they do, but if handling a default route expressed as
|
||
|
+ 0.0.0.0/0, the __len__() of the object becomes 0, which is used
|
||
|
+ as the boolean value of the object.
|
||
|
+ """
|
||
|
+ return True
|
||
|
|
||
|
def __len__(self):
|
||
|
"""
|