3 ms·
ISTR that when people discussed various ways of overloading the pipe on comp.lang.python back in the day, one thing you have to be careful of is that the bitwis
by jerf 16y ago
ISTR that when people discussed various ways of overloading the pipe on comp.lang.python back in the day, one thing you have to be careful of is that the bitwise OR operator binds relatively weakly [1], and that can result in some surprising behavior if you intuitively assign the | a precedence in your head more suited to the behavior implemented here. In this particular case, though, you probably wouldn't hit this problem very often... though in some ways that can make the problem worse in its own way.
[1]: http://docs.python.org/reference/expressions.html#summary http://docs.python.org/reference/expressions.html#summary
- lloeki 16y agoMentally making a note of that. I was wondering what kind of side effects the use of | would end up having, if any.
- VMG 16y agoThis calls for allowing the entirely user-defined $-operator in python 4.
- nyellin 16y agoWhat if two Python-based frameworks use $ for separate purposes? (e.g. Django and NumPy)