05.02.20 14:27, Musbur пише:
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.

   d = {}
   d |= {(1, 2)}

What is d now? {1: 2} or {(1, 2): None}
_______________________________________________
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/ZUXJBYUHXGAKLH3TOVB4UUXQUBFOQAIK/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to