Created
May 17, 2019 09:48
-
-
Save hackaugusto/d2f90687123022389bb346a0b35beac7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dataclasses import dataclass, field | |
| @dataclass | |
| class A: | |
| a: int = field(repr=False) | |
| @dataclass | |
| class B: | |
| b: A = field(repr=False) | |
| def f(): | |
| return B(A(1)).b.a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dataclasses import dataclass, field | |
| @dataclass | |
| class A: | |
| a: int = field(repr=False) | |
| @dataclass | |
| class B: | |
| b: A | |
| def f(): | |
| return B(A(1)).b.a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment