Noam Raphael wrote:
> I thought that the easiest
> way to get the key with a given index would be "d.keys[5]". But it
> means that d.keys is a collection of keys, not a method - and why not?

Half of your suggestion is being done -- d.keys() will create
and return an indexable view object, rather than a list.

Keeping it as a method rather than a property makes sense,
since it still involves the creation of an object rather than
just providing access to something already existing.

--
Greg
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to