We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f4a7ea commit 3126219Copy full SHA for 3126219
challenges/advanced-forward/solution.py
@@ -8,6 +8,19 @@ def copy(self) -> "MyClass":
8
return copied_object
9
10
11
+# Alternative soltion:
12
+#
13
+# from __future__ import annotations
14
+# class MyClass:
15
+# def __init__(self, x: int) -> None:
16
+# self.x = x
17
18
+# # TODO: Fix the type hints of `copy` to make it type check
19
+# def copy(self) -> MyClass:
20
+# copied_object = MyClass(x=self.x)
21
+# return copied_object
22
+
23
24
## End of your code ##
25
26
from typing import assert_type
0 commit comments