Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The whole cheatsheet is clearly in Python 3, where the same doc page that you linked states:

   Performing list(d) on a dictionary returns a list of all the keys used in the dictionary, in 
   insertion order ...


only specified as such since Python 3.7, which hadn't been released when this cheat sheet was written, at least if the date at the top is accurate.

EDIT: clicking through to GitHub, the date is clearly not up-to-date, so this might have been added later.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: