Sfoglia il codice sorgente

PythonUtil: Remove old next() interface from EnumIter

This was just there to support Python 2, which we no longer support.
rdb 4 anni fa
parent
commit
107d338d88
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1 2
      direct/src/showbase/PythonUtil.py

+ 1 - 2
direct/src/showbase/PythonUtil.py

@@ -1221,7 +1221,7 @@ def uniqueName(name):
 
 class EnumIter:
     def __init__(self, enum):
-        self._values = list(enum._stringTable.keys())
+        self._values = tuple(enum._stringTable.keys())
         self._index = 0
     def __iter__(self):
         return self
@@ -1230,7 +1230,6 @@ class EnumIter:
             raise StopIteration
         self._index += 1
         return self._values[self._index-1]
-    next = __next__
 
 class Enum:
     """Pass in list of strings or string of comma-separated strings.