|
@@ -1681,6 +1681,7 @@ 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('_','')
|
|
@@ -1695,7 +1696,6 @@ 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:
|