Jump to content

Incorrect Documentation of Python dict.keys() method


Wuelle
 Share

Recommended Posts

This page describes pythons dictionary.keys() Method as follows:

Quote

The keys() method returns a view object. The view object contains the keys of the dictionary, as a list.

This, however, is only correct in python 2.x, in python 3.x the keys() method returns a dict_keys Object.

dict_keys.png.9d2c2e56f85d70737cf1018d1b767784.png

Please note that i have never submitted an issue to w3schools before, i dont know if this is the right place to do it or if they intended their Documentation for python 2.x only.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...