r/programming • • Aug 25 '26

EVE Online: The Move to Python 3 Begins!

https://www.eveonline.com/news/view/the-move-to-python-3-begins
802 Upvotes

290 comments sorted by

View all comments

Show parent comment

8

u/flanger001 Aug 25 '26

It took my best friend (a DBA) explaining that it means "both less than and greater than" for me to actually understand it. That was January of this year.

12

u/Iamonreddit Aug 25 '26

Less than OR greater than, not both less than AND greater than.

A scalar value can't be less than AND greater than another scalar value.

-10

u/flanger001 Aug 25 '26

No, it's both less than AND greater than. I was correct here.

A scalar value can't be less than AND greater than another scalar value.

Correct, which is why it is the "not equals" operator.

8

u/bellicosebarnacle Aug 25 '26

Hmm, you're confused. a not equal to b means that either a < b OR a > b.

You could also say that a == b means a ≤ b AND a ≥ b. Maybe that's what you're thinking of?

6

u/Brian Aug 25 '26

a not equal to b means that either a < b OR a > b.

Though strictly speaking, this falls down in practice, as there are types that do define equality/inequality, but don't define ordering. Eg. for complex numbers it's not true that 1+i < 2, nor that it's greater, but it's definitely not equal.

1

u/Ameisen Aug 25 '26

Yeah, i and 1 have equal magnitude but not equal values.

Likewise, in C++:

std::is_same_v<char, signed char> == false
std::is_same_v<char, unsigned char> == false
std::is_same_v<signed char, unsigned char> == false

... but

std::is_same_v<int, signed int> == true
std::is_same_v<int, unsigned int> == false
std::is_same_v<signed int, unsigned int> == false

4

u/Iamonreddit Aug 25 '26

Are you just describing the characters used rather than what they mean?

Because sure the <> characters are literally the less than and greater than operators one after the other, but when used in this fashion it functions as less than OR greater than, which is just another way of representing not equal.

2

u/Haplo12345 Aug 29 '26

Are you trying to say any value using <> is a quantum value with two simultaneous states?