Dup Ver Goto 📝

DunderGeq

PT2/lang/python/syntax does not exist
To
18 lines, 52 words, 322 chars Page 'DunderGeq' does not exist.
# About as insane as C++'s iostream

class A:
  def __init__(self):
    self.vals = []
  def __str__(self):
    return ", ".join(str(x) for x in self.vals)
  def __ge__(self,x):
    self.vals.append(x)
    return self

a = A()

# note you need the parens here
(((a >= 10) >= 20 ) >= "hello" ) >= "world"
print(a)