mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -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__:
|
if __debug__:
|
||||||
# chars that cannot appear within an item string.
|
# chars that cannot appear within an item string.
|
||||||
InvalidChars = string.whitespace
|
InvalidChars = string.whitespace
|
||||||
@staticmethod
|
|
||||||
def _checkValidIdentifier(item):
|
def _checkValidIdentifier(item):
|
||||||
invalidChars = string.whitespace+string.punctuation
|
invalidChars = string.whitespace+string.punctuation
|
||||||
invalidChars = invalidChars.replace('_','')
|
invalidChars = invalidChars.replace('_','')
|
||||||
@ -1697,6 +1696,7 @@ class Enum:
|
|||||||
"Enum\n'%s'\ncontains illegal char '%s'" %
|
"Enum\n'%s'\ncontains illegal char '%s'" %
|
||||||
(item, char))
|
(item, char))
|
||||||
return 1
|
return 1
|
||||||
|
_checkValidIdentifier = staticmethod(_checkValidIdentifier)
|
||||||
|
|
||||||
def __init__(self, items, start=0):
|
def __init__(self, items, start=0):
|
||||||
if type(items) == types.StringType:
|
if type(items) == types.StringType:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user