TL:DR; How about rshift for the update operator?
When reading about ZipFile.Path in 3.8 I thought I might like to use the following one liner in a project I’m working on.
However fails to close the ZipFiles properly. I don’t really enjoy using double with statements either so instead of one I imagine I would need to do at least 3 with probably two intermediate variables.
So I then thought I might like to make a library that implements rshift for this double context manager operation where the ZipFiles are closed.
However this is in essence a namespace update, and so to be idiomatic I might instead implement iadd from PEP-584, which I don’t really like as much as it reverses the order of spam and eggs which isn’t the same as extractall, and I prefer src-to-dest order in a sequence of atomic directed graph operations instead of dest-from-src.
I noticed lshift is mentioned as a rejected idea in the PEP but not rshift. Has rshift already been rejected somewhere? I tried to use the search for this forum but I seem to be bad at it.
As an aside, this operator with my ZipFile idea would also make sense if Path.open worked on directories, with a context manager that could set permissions, notify security contexts etc and then revert on exit so I was hoping to explore all that as a learning exercise but it’s all a little late if += is to be the anointed python idiom for updating values by copying to a namespace from another.