> I'm surprised by that description. I don't think it is just newcomers
> who either suggest or prefer plus over pipe, and I don't think that pipe
> is "more accurate".
+1 (as one of the non-newcomers who prefers plus)
me too.
frankly, the | is obscure to most of us. And it started as "bitwise or", and evokes the __or__ magic method -- so why are we all convinced that somehow it's inextricably linked to "set union"? And set union is a bit obscure as well -- I don't think that many people (newbies or not) would jump right to this logic:
I need to put two dicts together
That's kind of like a set union operation
The set object uses | for union
That's probably what dict uses -- I'll give that t try.
Rather than:
I need to put two dicts together
I wonder if dicts support addition?
I'll give that a try.
so, I'm
+1 on +
+0 on |
if | is implemented, I'll bet you dollars to donuts that it will get used far less than if + were used.
(though some on this thread would think that's a good thing :-) )
-CHB
--