mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
let's not use python 2.4 syntax yet
This commit is contained in:
parent
54a803d358
commit
ee145655e2
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user