Skip to content

Commit

Permalink
Prevent naming overrides conflicts in setup_terms for legacy code
Browse files Browse the repository at this point in the history
  • Loading branch information
Chenyang Liu committed Sep 4, 2014
1 parent 0a386e7 commit c93ca47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ch.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def parm_declarations(cls):

@classmethod
def setup_terms(cls):
if cls.__name__ in cls._setup_terms: return
if id(cls) in cls._setup_terms: return

if cls == Ch:
return
Expand Down Expand Up @@ -147,7 +147,7 @@ def setup_terms(cls):
cls.term_order = list(cls.terms) + list(cls.dterms)

_check_kw_conflict(cls)
cls._setup_terms[cls.__name__] = True
cls._setup_terms[id(cls)] = True


########################################################
Expand Down

0 comments on commit c93ca47

Please sign in to comment.