[Python-ideas] PEP pre-draft: Support for indexing with keyword arguments

Jonas Wielicki j.wielicki at sotecware.net
Fri Jul 4 10:21:53 CEST 2014


On 03.07.2014 20:30, Stefano Borini wrote:
> The keyindex object could be made to implement the same interface as its value
> through forwarding, so it can behave just as its value if your logic cares only about
> position, and not key
> 
>>>> keyindex("z", 4) + 1
> 5
> 

What about a value which has a .key attribute?

regards,
jwi



More information about the Python-ideas mailing list