-
Notifications
You must be signed in to change notification settings - Fork 53
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
PEP 8 function names: asdict -> as_dict, astuple -> as_tuple #110
Comments
|
I don't think this improves readability. I would even say that using underscores in such short names looks a bit weird. |
|
Actually, I agree with @ericvsmith that underscores improve readability, so I'm +1 on |
|
Otoh this is similar to `namedtuple._asdict`.
|
|
FWIW, I’m a huge fan of underscores and their lack bothers me in asdict. But as Guido points out, we have a precedent and I found it unfortunate/confusing to build an API that has the same name but a different spelling. |
|
Okay, let's leave this as-is, without the underscore. I'll add a note to the PEP that we're choosing consistency with existing APIs as the reason. |
|
PEP updated. |
|
Would it be bad to have an alias This is not meant to imply that I am bothered by the name |
|
We wouldn't want to have two names for the same thing. It adds confusion. |
No description provided.
The text was updated successfully, but these errors were encountered: