You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docs: change functools.Placeholder import alias #160953
The import alias import Placeholder as _ seems to be bad practice, as the underscore could easily conflict with temporary loop variables or a text translation function, both of which are usually named _.
I suggest using _P instead, which is also pretty convenient.
Activity
Docs: change functools.Placeholder import alias (fixes python#160953)
picnixz commentedon Oct 30, 2026
I like the
_better because it visually shows a placeholder._Plooks liks a private variable or private class.picnixz commentedon Oct 30, 2026
As for conflicting with translations or unused vars, that should be changed accordingly in user code. For the example it is enough IMO.
Omega-127 commentedon Oct 30, 2026
Looks interesting can I get assigned? Only if this issue is still doable
picnixz commentedon Oct 30, 2026
I do not think this will be something to change. At least I find
_rather better in the docs for that.