-
-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document when to use positional-only markers #1020
Comments
@ezio-melotti @erlend-aasland you'll likely be interested in this as well... Great point. As far as has been presented, the status quo is that there apparently is no clear policy, guidance or consensus on when to use the standard positional-only markers vs. more esoteric/contrived syntax, just individual dev's opinions, as is presented in that comment—and at least in the issues/PRs listed, I couldn't really find any others actively advocating for the same particular position. As such, before enshrining any particular opinion as concrete written guidance in the devguide, IMO it would be a lot more beneficial to have a public discussion on this issue first (specifically, use of FWIW, in the interests of full disclosure, my current viewpoint is that while it may be worth considering special-casing * IMO, instead of special-casing |
It looks as if this has been added to cpython docs. Closing here since it is out of scope for the devguide. |
@willingc are you sure this has been addressed in CPython? I think deciding on a general policy here, and adding it to the devguide, would be really useful. python/cpython#91485 didn't decide on a general policy here; somebody just happened to mention this issue in a comment as part of that PR thread :) |
FTR this was discussed again by the docs editorial board. |
This was recently the source of confusion that led to a sequence of PRs and reverts that caused a documentation regression, e.g. see python/cpython#100546 python/cpython#98340 python/cpython#91485 and some of the related PRs.
python/cpython#100444 (comment) is a reasonable summary of the current policy.
(Acknowledging there are somewhat related larger discussions, like how to document default values, when to use
[]
for optional parameters, whether to include types in documentation, but we can document the status quo before we figure those out. If we come up with some really nice solution for types in documentation, that could be a good place for positional-only information to live)The text was updated successfully, but these errors were encountered: