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

Change statement about dictionaries? #6

Open
cdeil opened this issue Feb 12, 2017 · 1 comment
Open

Change statement about dictionaries? #6

cdeil opened this issue Feb 12, 2017 · 1 comment

Comments

@cdeil
Copy link
Contributor

cdeil commented Feb 12, 2017

Currently you have this statement about Python dictionaries:

http://nbviewer.jupyter.org/github/jakevdp/WhirlwindTourOfPython/blob/master/06-Built-in-Data-Structures.ipynb#Dictionaries

Keep in mind that dictionaries do not maintain any sense of order for the input parameters; this is by design. This lack of ordering allows dictionaries to be implemented very efficiently, so that random element access is very fast, regardless of the size of the dictionary (if you're curious how this works, read about the concept of a hash table).

Now that Python 3.6 has ordered and more efficient dictionaries, this statement should be changed, no? Maybe re-word the existing sentence starting with "This lack ..." or add a new one pointing to e.g. https://docs.python.org/3/whatsnew/3.6.html#new-dict-implementation ?

@jakevdp
Copy link
Owner

jakevdp commented Feb 14, 2017

Good point! I'll think about how I want to address this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants