forked from petervaro/python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPython3.py
More file actions
52 lines (39 loc) · 1.25 KB
/
Copy pathPython3.py
File metadata and controls
52 lines (39 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from module import Klass
from math import pi as PI
from matrix import MAT1, MAT2
def class_decorator(cls):
cls.__call__ = lambda self: print('Cabbage!')
return cls
@class_decorator
class Class(Klass):
@property
def property(self):
temp, ellipsis = self._property
return {temp} if temp%0x12f2 else set()
@property.setter
def property(self, value):
try:
temp = value//0o123
except TypeError:
temp = 1.
def do_something(m):
nonlocal temp
return temp, ...
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
print("I'm", "alive!", sep='\n')
async def func(self : 'Class',
callback : 'callable'
domain : [0b00, PI],
opt : bool=True) -> None:
""" doc string """
self._property = await callback(MAT1 @ MAT2)
r'''(?<!\d+)
\s*?\W # multiline regex comment
\d$'''
x, y, z, path = f(r'[[]'), R'[]]', r'[^a-zA-Z_]', r'C:\Users\Wilson\new'
f'{self.method(x, y, z, {"a": 97})!a:>>12} => {u:0>16b} {{{v!r}}}'
if __name__ == '__main__':
c = Class()
c.func(.12)
c.property = 0b1011101110