Hi Greg
Thank you, for your support for d[x=1, y=2] being valid syntax.
You ask if I have any use cases in mind for a general keyword key class being part of standard Python. Good question.
Anyone who is experimenting with keyword keys would, I think, appreciate having something they can use straight away. Thus, I think, any use case for PEP 472 is also a use case for the general keyword class I'm suggesting. No use cases for PEP 472 would of course be fatal.
Storing function call results would be a use case. For this, look at the implementation of functools.lru_cache.
I am keen to develop, with others, examples of how PEP 472 could help us in real-world programming. Even if convinced that PEP 472 is a good idea, the examples would help us get the details right, and also help with formal and informal documentation.
For a specific example, a simple ad hoc way of recording data. For example
>>> height[x=10, y=14] = 2010
We can already use dictionaries in this way, as in
>>> height[10, 14] = 2010
So this is a bit like using named tuples instead of tuples.
I think that's enough for now.
--
Jonathan