8000 Dictionary and set documentation mixup · Issue #123621 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Dictionary and set documentation mixup #123621

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

Closed
AttilaLiptak opened this issue Sep 3, 2024 · 2 comments
Closed

Dictionary and set documentation mixup #123621

AttilaLiptak opened this issue Sep 3, 2024 · 2 comments
Labels
docs Documentation in the Doc dir

Comments

@AttilaLiptak
Copy link
Contributor
AttilaLiptak commented Sep 3, 2024

Documentation

https://docs.python.org/3/reference/datamodel.html

3.2.7.1. Dictionaries

The documentation says the following:
"Dictionaries are mutable; they can be created by the {...} notation."

However any Python interpreter shows the following result:

print(type({}))
<class 'dict'>
print(type({...}))
<class 'set'>

I suspect the documentation mixes up the empty set and empty dictionary creation.

Linked PRs

@AttilaLiptak AttilaLiptak added the docs Documentation in the Doc dir label Sep 3, 2024
@sobolevn
Copy link
Member
sobolevn commented Sep 3, 2024

Would you like to send a PR? I agree that using a valid set literal {...} to show how dicts are created is not right.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 3, 2024
…honGH-123648)

(cherry picked from commit cfbc841)

Co-authored-by: Lipták Attila (Flash) <113017309+AttilaLiptak@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 3, 2024
…honGH-123648)

(cherry picked from commit cfbc841)

Co-authored-by: Lipták Attila (Flash) <113017309+AttilaLiptak@users.noreply.github.com>
@sobolevn
Copy link
Member
sobolevn commented Sep 3, 2024

Thanks, I will send one more PR with some extra changes in a separate issue! 👍

sobolevn pushed a commit that referenced this issue Sep 3, 2024
…-123648) (#123654)

gh-123621: Fix `datamodel.rst` with proper `dict` notation (GH-123648)
(cherry picked from commit cfbc841)

Co-authored-by: Lipták Attila (Flash) <113017309+AttilaLiptak@users.noreply.github.com>
sobolevn pushed a commit that referenced this issue Sep 3, 2024
…-123648) (#123653)

gh-123621: Fix `datamodel.rst` with proper `dict` notation (GH-123648)
(cherry picked from commit cfbc841)

Co-authored-by: Lipták Attila (Flash) <113017309+AttilaLiptak@users.noreply.github.com>
@sobolevn sobolevn closed this as completed Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

2 participants
0