diff options
Diffstat (limited to 'test/data/module.py')
-rw-r--r-- | test/data/module.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/test/data/module.py b/test/data/module.py index 493e676..3b83811 100644 --- a/test/data/module.py +++ b/test/data/module.py @@ -21,11 +21,14 @@ def global_access(key, val): else: break else: - print('!!!') + print("!!!") + class YO: """hehe""" - a=1 + + a = 1 + def __init__(self): try: self.yo = 1 @@ -36,7 +39,8 @@ class YO: except: raise -#print('*****>',YO.__dict__) + +# print('*****>',YO.__dict__) class YOUPI(YO): class_attr = None @@ -51,19 +55,21 @@ class YOUPI(YO): local = None autre = [a for a, b in MY_DICT if b] if b in autre: - print('yo', end=' ') + print("yo", end=" ") elif a in autre: - print('hehe') + print("hehe") global_access(local, val=autre) finally: return local def static_method(): """static method test""" - assert MY_DICT, '???' + assert MY_DICT, "???" + static_method = staticmethod(static_method) def class_method(cls): """class method test""" exec(a, b) + class_method = classmethod(class_method) |