Created
May 17, 2019 10:31
-
-
Save hackaugusto/2266871f69dac442e0bd210365c38d7a 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 A1: | |
| a: int | |
| @dataclass | |
| class A2: | |
| a: A1 = field(repr=False) | |
| class B: | |
| b: int | |
| def __init__(self, b): | |
| self.b = b | |
| def func(): | |
| # pylint: disable=E1101 | |
| f = A2(A1(1)).a.a | |
| s = B(1).a | |
| return (f, s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment