Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc5d5b16

Browse files
committed
Clarify that the private name mangling is intentional
1 parentc6f518b commitc5d5b16

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
ifnotTYPE_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)

[8]ページ先頭

©2009-2025 Movatter.jp