]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
remove backwards compatibility for something deleted 10 years ago
authorBob Halley <halley@dnspython.org>
Sun, 3 May 2020 14:02:49 +0000 (07:02 -0700)
committerBob Halley <halley@dnspython.org>
Sun, 3 May 2020 14:02:49 +0000 (07:02 -0700)
dns/tokenizer.py

index b56f97a8dd14988bf52f90734904f025b54ddc24..8585ccc8978d850400108b8ffb9a25a66e0f3132 100644 (file)
@@ -190,22 +190,6 @@ class Token(object):
                 unescaped += c.encode()
         return Token(self.ttype, bytes(unescaped))
 
-    # compatibility for old-style tuple tokens
-
-    def __len__(self):
-        return 2
-
-    def __iter__(self):
-        return iter((self.ttype, self.value))
-
-    def __getitem__(self, i):
-        if i == 0:
-            return self.ttype
-        elif i == 1:
-            return self.value
-        else:
-            raise IndexError
-
 
 class Tokenizer(object):
     """A DNS master file format tokenizer.