Skip to content
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

Python 3 tutorial has old information about dicts #48906

Closed
mdcowles mannequin opened this issue Dec 14, 2008 · 2 comments
Closed

Python 3 tutorial has old information about dicts #48906

mdcowles mannequin opened this issue Dec 14, 2008 · 2 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@mdcowles
Copy link
Mannequin

mdcowles mannequin commented Dec 14, 2008

BPO 4656
Nosy @birkenfeld, @benjaminp

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2008-12-14.15:09:58.044>
created_at = <Date 2008-12-14.04:06:19.853>
labels = ['docs']
title = 'Python 3 tutorial has old information about dicts'
updated_at = <Date 2008-12-14.15:09:57.970>
user = 'https://bugs.python.org/mdcowles'

bugs.python.org fields:

activity = <Date 2008-12-14.15:09:57.970>
actor = 'benjamin.peterson'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2008-12-14.15:09:58.044>
closer = 'benjamin.peterson'
components = ['Documentation']
creation = <Date 2008-12-14.04:06:19.853>
creator = 'mdcowles'
dependencies = []
files = []
hgrepos = []
issue_num = 4656
keywords = []
message_count = 2.0
messages = ['77776', '77800']
nosy_count = 3.0
nosy_names = ['georg.brandl', 'mdcowles', 'benjamin.peterson']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue4656'
versions = ['Python 3.0']

@mdcowles
Copy link
Mannequin Author

mdcowles mannequin commented Dec 14, 2008

[From a question sent to the python-help list.]

In the Python 3 tutorial at:

http://docs.python.org/3.0/tutorial/datastructures.html#dictionaries

it says:

The keys() method of a dictionary object returns a list of all the keys
used in the dictionary, in arbitrary order if you want it sorted, just
apply the sort() method to the list of keys

But in What's New in Python 3.0 at:

http://docs.python.org/3.0/whatsnew/3.0.html

it says:

dict methods dict.keys(), dict.items() and dict.values() return “views”
instead of lists. For example, this no longer works: k = d.keys();
k.sort(). Use k = sorted(d) instead

I expect that it's just a matter of updating the tutorial.

@mdcowles mdcowles mannequin assigned birkenfeld Dec 14, 2008
@mdcowles mdcowles mannequin added the docs Documentation in the Doc dir label Dec 14, 2008
@benjaminp
Copy link
Contributor

Thanks! Fixed in r67755.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
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