1

I was submitted a piece of Python3 code where the student wrote strange code that actually runs.

def foo(bar):
    print:(foo(bar))

After some tries, I found out I could do things with this colon:

foo          # SyntaxError
foo:1        # works
print(foo:5) # SyntaxError
foo:1 = 2    # works

Is this some Type Hinting shenanigan?

BlueMoon93
  • 2,850
  • 20
  • 39

0 Answers0