Thanks to visit codestin.com Credit goes to github.com
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 ec06e00 commit 3838bffCopy full SHA for 3838bff
1 file changed
docs/source/cheat_sheet_py3.rst
@@ -209,6 +209,7 @@ Classes
209
# This will allow access to any A.x, if x is compatible with the return type
210
def __getattr__(self, name: str) -> int: ...
211
212
+ a = A()
213
a.foo = 42 # Works
214
a.bar = 'Ex-parrot' # Fails type checking
215
0 commit comments