0

Is it possible to overload the meaning of different keywords in Python? I'd like to implement my own version of if and for etc.

ruohola
  • 21,987
  • 6
  • 62
  • 97
JRR
  • 6,014
  • 6
  • 39
  • 59

1 Answers1

1

No it is not possible in any way*. You can only overload the behavior of operators, such as +, ==, and [].

Without recompiling your own fork of Python, and thus essentially making a new language.

ruohola
  • 21,987
  • 6
  • 62
  • 97