Use types module for class inheritence instead

This commit is contained in:
Cutipus 2018-04-26 21:05:45 +03:00
parent 68bf4cfd21
commit 1c58417ce6
1 changed files with 2 additions and 1 deletions

3
yes.py
View File

@ -1,4 +1,5 @@
import inspect
import types
from io import StringIO
import sys
import re
@ -6,7 +7,7 @@ import re
did_you_mean = re.compile(r'Did you mean (.*)\?', re.IGNORECASE)
what = 'what?'
class Yes(sys.__class__):
class Yes(types.ModuleType):
def __init__(self, other):
for attr in dir(other):
setattr(self, attr, getattr(other, attr))