Skip to content

Commit 3838bff

Browse files
authored
Docs: Add missing class instantiation to cheat sheet (#16817)
1 parent ec06e00 commit 3838bff

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/source/cheat_sheet_py3.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ Classes
209209
# This will allow access to any A.x, if x is compatible with the return type
210210
def __getattr__(self, name: str) -> int: ...
211211
212+
a = A()
212213
a.foo = 42 # Works
213214
a.bar = 'Ex-parrot' # Fails type checking
214215

0 commit comments

Comments
 (0)