Commit 6079044
committed
Format generics-exercise1.py with Black and refactor age property
- Add @Property decorator to age() method for attribute-like access
- Format long conditional statement across multiple lines
- Add blank lines between logical sections for readability
- Change child.age() method call to child.age property access
- Improve code formatting consistency with Black formatter
- Maintain all functionality while improving code style1 parent ffef3cd commit 6079044
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
| 23 | + | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| 29 | + | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
| 36 | + | |
0 commit comments