Repository navigation
Commit e03cf3e
authored
PEP 526: Fix name mangling example (#5138)
Name mangling only applies inside a class body, so a module-level
``__points: int`` is stored as ``'__points'``, not ``'_Player__points'``.
Move the annotation into the class and print its ``__annotations__``.1 parent 7d5ca36 commit e03cf3e
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
| 441 | + | |
442 | 442 | | |
443 | | - | |
444 | 443 | | |
445 | 444 | | |
446 | | - | |
447 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| |||
0 commit comments