Skip to content

Commit

Permalink
Fixed #202 -- Removed the (unused) internal cache from EventType.
Browse files Browse the repository at this point in the history
  • Loading branch information
apollo13 committed Jan 21, 2017
1 parent 0947a45 commit 2989419
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions circuits/core/events.py
Expand Up @@ -8,20 +8,11 @@


class EventType(type):

__cache__ = {}

def __new__(cls, name, bases, ns):
key = (cls, name, bases)

try:
return cls.__cache__[key]
except KeyError:
cls = type.__new__(cls, name, bases, ns)

setattr(cls, "name", ns.get("name", cls.__name__))
cls = type.__new__(cls, name, bases, ns)
setattr(cls, "name", ns.get("name", cls.__name__))

return cls
return cls


class Event(object):
Expand Down

0 comments on commit 2989419

Please sign in to comment.