I didn’t see this addressed in PEP 584, so I’d like to ask if it would make sense to have a
dict.union() method to match the new
| dict union operator. So instead of
a | b you could write
This would mirror
set.union() and offer people an explicit name which some may find more readable than the
PEP 584 does have a section called What About The Full set API?, but that seems focused on supporting all the set operators.
Perhaps this suggestion to offer named methods that mirror the new
dict operators should just be added to that section of the PEP and addressed if/when the proposed follow-on PEP materializes.