Browse Source

let's not use python 2.4 syntax yet

David Rose 20 years ago
parent
commit
ee145655e2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      direct/src/showbase/PythonUtil.py

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

@@ -1682,7 +1682,6 @@ class Enum:
     if __debug__:
         # chars that cannot appear within an item string.
         InvalidChars = string.whitespace
-        @staticmethod
         def _checkValidIdentifier(item):
             invalidChars = string.whitespace+string.punctuation
             invalidChars = invalidChars.replace('_','')
@@ -1697,6 +1696,7 @@ class Enum:
                             "Enum\n'%s'\ncontains illegal char '%s'" %
                             (item, char))
             return 1
+        _checkValidIdentifier = staticmethod(_checkValidIdentifier)
 
     def __init__(self, items, start=0):
         if type(items) == types.StringType: