Closed ghost closed 8 years ago
Based on class name for example:
class EventType(type): def __call__(cls, *args, **kwargs): event = type.__call__(cls, *args, **kwargs) event.set_name(str(cls)) return event def __str__(cls): return cls.__name__ class BaseEvent(Event, metaclass=EventType): pass
Based on class name for example: