[docs] [issue20902] Which operand is preferred by set operations? Missing information in the documentation
report at bugs.python.org
Thu Mar 13 08:55:40 CET 2014
Giacomo Alzetta added the comment:
I asked this because, for example, in Haskell it *is* a well-defined behaviour (see its documentation at: http://hackage.haskell.org/package/containers-0.5.4.0/docs/Data-Set.html): the left operand is preferred by all operations.
In fact, working with Haskell, I also have used such behaviour in the past. For example when writing a simple type-checker it's quite convenient to use such behaviour when handling environments where you want inner blocks to hide outer variables. Not defining such behaviour means that you must re-implement the wheel in order to achieve the correct behaviour.
In any case, this information should be made explicit in the docs, whether we want to make the behaviour defined or not.
Python tracker <report at bugs.python.org>
More information about the docs