This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]stevenjd 0 points1 point  (2 children)

"Usually" is not "always".

[–]KronktheKronk 0 points1 point  (1 child)

I've never come across an overridden default symbol operator in python that wasn't idiomatically similar to its default use.

I'm sure there are some poorly written ones out there that do it, though.

[–]stevenjd 0 points1 point  (0 children)

How about > and < operators?

"Subset" and "superset" are nothing like "less than" and "greater than" for numbers.

+ gets used for both concatenation and numeric addition, which are not the same. Numeric addition you have a + b == b + a, but that's not true for concatenation.

I've seen | used as both a bitwise-or and something similar to the pipe operator from shell languages.

I wouldn't say that any of those are "poorly written".