On 05/02/2020 12:27, Musbur wrote:
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.

Why None? Why not 0, or False, or 42? This sort of thing belongs more in a function or method, IMHO.

On the original PEP, I'm resigned to it being the union operator and +1 on the whole thing. Good work, guys!

--
Rhodri James *-* Kynesim Ltd
_______________________________________________
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/WUOEEIO3TDP6TOT2UWYEXVVQBEZ7XN2G/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to