Skip to content

Commit 983e5f1

Browse files
committed
bugfix
1 parent 4b41081 commit 983e5f1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

05-decorators.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ class IntType(TypeChecker):
2323
def type_check(cls):
2424
for var_name, checker in cls.__dict__.items():
2525
if isinstance(checker, TypeChecker):
26-
checker.name = var_name
26+
checker.name = f'_{var_name}'
2727
return cls
2828

2929

3030
@type_check
3131
class Point:
32+
x = IntType()
33+
y = IntType()
34+
3235
def __init__(self, x, y):
3336
self.x = x
3437
self.y = y

0 commit comments

Comments
 (0)