This is a great PEP. Just recently I needed this and was surprised that
nothing of the sort had been implemented yet (I looked for quite some
time).
I have one suggestion: Wouldn't it be useful for these operators to also
accept sets (functionally acting like a dict with None for all values)?
This would make it very elegant to 'normalize' dicts by pruning (dict &
set) or padding (set | dict) dictionaries. I would find this useful for
efficient data sanitation purposes, as when processing input from web
forms.
Am 05.02.2020 02:28 schrieb Guido van Rossum:
Thanks Brandt (and Steven of course)! If there are no objections by
next week I'll recommend this to the Steering Council for acceptance.
In the meantime, I am wondering about the reference implementation --
is it suitable to submit as a PR? Or is it a toy written in pure
Python? (I found it a little tricky to follow your branch.)
On Tue, Feb 4, 2020 at 4:57 PM Brandt Bucher <brandtbuc...@gmail.com>
wrote:
Steven D'Aprano and I have pushed a third draft of PEP 584:
https://www.python.org/dev/peps/pep-0584/ [1]
The accompanying reference implementation is on GitHub:
https://github.com/brandtbucher/cpython/tree/addiction [2]
For those who have been following the discussions over the past
year on python-ideas, this new draft does not contain much
additional content; the most notable difference is that the choice
of operator has been changed from + to |. The rest of the revisions
are mostly reformatting and reorganizing the information to bring
the document in line with PEP standards.
Please let us know what you think – we'd love to hear any *new*
feedback that hasn't yet been addressed in the PEP or the related
discussions it links to!
Thanks!
Brandt
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/ [3]
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/TTIKCDIPC2CDHX23Y57CPHDSVYOWCCER/
[4]
Code of Conduct: http://python.org/psf/codeofconduct/ [5]
--
--Guido van Rossum (python.org/~guido [6])
_Pronouns: he/him __(why is my pronoun here?)_ [7]
Links:
------
[1] https://www.python.org/dev/peps/pep-0584/
[2] https://github.com/brandtbucher/cpython/tree/addiction
[3] https://mail.python.org/mailman3/lists/python-dev.python.org/
[4]
https://mail.python.org/archives/list/python-dev@python.org/message/TTIKCDIPC2CDHX23Y57CPHDSVYOWCCER/
[5] http://python.org/psf/codeofconduct/
[6] http://python.org/~guido
[7]
http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/NFVVGNXBSABWIPCDH6C3AQA65R37DFPJ/
Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/CL2AKG47ZJJQXHUREHTD47VQZYJZNJLH/
Code of Conduct: http://python.org/psf/codeofconduct/