On Wed, Aug 5, 2020 at 3:01 PM Stefano Borini email@example.com wrote:
Maybe I should open a new PEP?
I"ll let teh PEP editors decide, but it look slike it was "rejected"m with this comment:
"The idea never seemed to gain any traction over its near 5 years in existence as a PEP."
So I'd think re-opening it would be fine -- rather than clutter up the PEP namespace...
Maybe we could use a "suspended" status for PEPs?
On Tue, 4 Aug 2020 at 14:26, Jonathan Fine firstname.lastname@example.org wrote:
Thank you all for your posts. I'm busy now and for the next few days, so
have little time to respond. Here's some comments and suggestions.
I hope that Andras, Caleb, Stefano, Neil, Joao Bueno, Todd and Stephan
will take a special interest in this post. In the previous thread, these people saw that the proposed new syntax
d[1, 2, a=3, b=4]
would bring benefits to their own particular use of Python. (Apologies
for any omitted names or misunderstanding of posts).
I hope the package kwkey shows that it is possible now to write from kwkey import o d[o(1, 2, a=3, b=4)] as a workable present day substitute for the proposed syntax d[1, 2, a=3, b=4]
I think using this can safely go ahead, even though there may be
disagreements on the meaning of 'o' and the implementation of classes that take advantage of the new syntax. Indeed, I think going ahead now will contribute to understanding and resolving the disagreements, by creating a shared experience.
I suggest that those who previously suggested uses for the proposed
syntax now implement some examples. (I give a list below.) They can do this using my API, Steven's API, or any other API. Or indeed now, using the return value of 'o' directly.
I've started this process with a toy example:
Here are three aspects to the proposed syntax. They are all important,
and good design will balance between the various parts and interests.
First, ordinary programmers, who perhaps want d[1, 2] d[x=1, y=2] d[1, y=2] d[y=2, x=1] to all be equivalent, for d a mapping of whose domain is points in the
x-y plane. More complicated examples might be found in function annotations (Andras Tantos, Caleb Donovick), quantum chemistry (Stefano Borini), networkx (Neil Girdhar), numpy and pandas (Joao Bueno), xarrary (Todd, Stephan Hoyer).
Second, there are those who implement classes that make use of the
Third, there are those who implement the extension of Python that allows d[o(1, 2, a=3, b=4)] to be replaced by d[1, 2, 3, 4]
I suggest that those who see benefits in feature produce experimental
implementations via kwkey, just as I did in my kwkey.example_jfine. It is possible to do this now, and so have benefits now, in a way that is reasonably future proof regarding implementation of the proposed new syntax.
If you're a user of kwkey, I will have some time available to help you
if you want it.
I hope this helps some, and harms none.
-- Kind regards,
Stefano Borini _______________________________________________ Python-ideas mailing list -- email@example.com To unsubscribe send an email to firstname.lastname@example.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://email@example.com/message/QK3YV3... Code of Conduct: http://python.org/psf/codeofconduct/