GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-96397: Document that attributes need not be identifiers by jeff5 · Pull Request #96454 · python/cpython

Conversation

@jeff5

@jeff5 jeff5 commented Aug 31, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Companion to #96393, and stemming from points made in the discussions at https://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.

  • Issue: Clarify status of non-identifier unpacked keyword arguments #96397

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jeff5
Docs: attributes need not be identifiers
57522c9
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.
@bedevere-bot bedevere-bot added docs Documentation in the Doc dir skip news awaiting review labels Aug 31, 2022
@jeff5 jeff5 mentioned this pull request Aug 31, 2022
Clarify status of non-identifier unpacked keyword arguments #96397
Closed
ChrisBarker-NOAA
ChrisBarker-NOAA reviewed Sep 1, 2022
View reviewed changes

@ChrisBarker-NOAA ChrisBarker-NOAA left a comment

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Sep 13, 2022
gh-96397: Document that keywords in calls need not be identifiers #96393
Merged
Non-identifier keys in ** arguments and elsewhere python/steering-council#142
Closed
merwok
merwok approved these changes Sep 22, 2022
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Sep 22, 2022
@jeff5

jeff5 commented Sep 29, 2022

Copy link
Copy Markdown
Contributor Author

Could this be merged, or have I more to do?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@merwok
merwok requested a review from gvanrossum September 29, 2022 17:01
gvanrossum
gvanrossum approved these changes Sep 29, 2022
View reviewed changes

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/glossary.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@gvanrossum @CAM-Gerlach
Mention getattr in definition of attribute
6deda04
Co-authored-by: C.A.M. Gerlach <[email protected]>
@gvanrossum
gvanrossum merged commit 9a11ed8 into python:main Sep 29, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label Sep 29, 2022
@gvanrossum gvanrossum added needs backport to 3.10 needs backport to 3.11 only security fixes labels Sep 29, 2022
@miss-islington

miss-islington commented Sep 29, 2022

Copy link
Copy Markdown
Contributor

Thanks @jeff5 for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington

miss-islington commented Sep 29, 2022

Copy link
Copy Markdown
Contributor

Thanks @jeff5 for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Sep 29, 2022

Copy link
Copy Markdown

GH-97658 is a backport of this pull request to the 3.10 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed needs backport to 3.10 needs backport to 3.11 only security fixes labels Sep 29, 2022
@bedevere-bot

bedevere-bot commented Sep 29, 2022

Copy link
Copy Markdown

GH-97659 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 29, 2022
@jeff5 @miss-islington
pythongh-96397: Document that attributes need not be identifiers (pyt…
6f35088
…honGH-96454)

Co-authored-by: C.A.M. Gerlach <[email protected]>
(cherry picked from commit 9a11ed8)

Co-authored-by: Jeff Allen <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 29, 2022
@jeff5 @miss-islington
pythongh-96397: Document that attributes need not be identifiers (pyt…
9cd0c6d
…honGH-96454)

Co-authored-by: C.A.M. Gerlach <[email protected]>
(cherry picked from commit 9a11ed8)

Co-authored-by: Jeff Allen <[email protected]>
miss-islington added a commit that referenced this pull request Sep 29, 2022
@miss-islington @jeff5
gh-96397: Document that attributes need not be identifiers (GH-96454)
27891e0
Co-authored-by: C.A.M. Gerlach <[email protected]>
(cherry picked from commit 9a11ed8)

Co-authored-by: Jeff Allen <[email protected]>
miss-islington added a commit that referenced this pull request Sep 29, 2022
@miss-islington @jeff5
gh-96397: Document that attributes need not be identifiers (GH-96454)
0688f11
Co-authored-by: C.A.M. Gerlach <[email protected]>
(cherry picked from commit 9a11ed8)

Co-authored-by: Jeff Allen <[email protected]>
serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this pull request Oct 2, 2022
@jeff5 @CAM-Gerlach @serhiy-storchaka
pythongh-96397: Document that attributes need not be identifiers (pyt…
679cf96
…hon#96454)

Co-authored-by: C.A.M. Gerlach <[email protected]>
@AlexWaygood AlexWaygood mentioned this pull request Oct 11, 2022
bpo-35105: Document that CPython accepts "invalid" identifiers #11263
Closed
pablogsal pushed a commit that referenced this pull request Oct 22, 2022
@miss-islington @jeff5 @pablogsal
gh-96397: Document that attributes need not be identifiers (GH-96454)
f20ad5e
Co-authored-by: C.A.M. Gerlach <[email protected]>
(cherry picked from commit 9a11ed8)

Co-authored-by: Jeff Allen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@CAM-Gerlach CAM-Gerlach CAM-Gerlach left review comments
@merwok merwok merwok approved these changes
@gvanrossum gvanrossum gvanrossum approved these changes
+1 more reviewer
@ChrisBarker-NOAA ChrisBarker-NOAA ChrisBarker-NOAA left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@jeff5 @miss-islington @bedevere-bot @merwok @ChrisBarker-NOAA @gvanrossum @CAM-Gerlach
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.