Skip to content

Commit c5d5b16

Browse files
committed
Clarify that the private name mangling is intentional
1 parent c6f518b commit c5d5b16

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git/cmd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@ def __setattr(cls, name: str, value: Any) -> Any:
348348
if not TYPE_CHECKING:
349349
# To preserve static checking for undefined/misspelled attributes while letting
350350
# the methods' bodies be type-checked, these are defined as non-special methods,
351-
# then bound to special names out of view of static type checkers.
351+
# then bound to special names out of view of static type checkers. (The original
352+
# names invoke name mangling (leading "__") to avoid confusion in other scopes.)
352353
__getattribute__ = __getattribute
353354
__setattr__ = __setattr
354355

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy