From 29c6ebe53f02a5dba4f4d397b5a5d69682fe5471 Mon Sep 17 00:00:00 2001 From: Jeff Ferland Date: Tue, 30 Apr 2013 16:05:33 -0700 Subject: [PATCH 03/35] Revert "IPSet doesn't **need** MutableSet inheritance. Try/catch it." This reverts commit 4d6fbf91a50a2ebc24ff01d3406232d1666677ec. We can't make IPSet work without various collections, so just use them all. --- IPy.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/IPy.py b/IPy.py index 0e17aab..60f7a43 100644 --- a/IPy.py +++ b/IPy.py @@ -1016,12 +1016,7 @@ class IP(IPint): raise ValueError("%s cannot be converted to an IPv4 address." % repr(self)) -try: - IPSetBaseClass = collections.MutableSet -except AttributeError: - IPSetBaseClass = object - -class IPSet(IPSetBaseClass): +class IPSet(collections.MutableSet): def __init__(self, iterable=[]): # Make sure it's iterable, otherwise wrap if not isinstance(iterable, collections.Iterable): -- 1.8.3.1