Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
gh-96397: Document that attributes need not be identifiers#96454
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Clarify that the name of an attribute need not be a valid Python identifier, in particular through setarr(), noting that this precludes use of the dot notation to access them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good to me -- I've suggested a bit more verbose text, but not critical.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Could this be merged, or have I more to do? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM, one optional suggestion.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Thanks@jeff5 for the PR, and@gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
Thanks@jeff5 for the PR, and@gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
bedevere-bot commentedSep 29, 2022
GH-97658 is a backport of this pull request to the3.10 branch. |
bedevere-bot commentedSep 29, 2022
GH-97659 is a backport of this pull request to the3.11 branch. |
…honGH-96454)Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>(cherry picked from commit9a11ed8)Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
…honGH-96454)Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>(cherry picked from commit9a11ed8)Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
…hon#96454)Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Uh oh!
There was an error while loading.Please reload this page.
Companion to#96393, and stemming from points made in the discussions athttps://discuss.python.org/t/supporting-or-not-invalid-identifiers-in-kwargs/17147/26 and#96397, this proposes extending how we define "attribute" to match the behaviour of implementations and some current user practice.
Needs SC discussion, I believe.