0

Does Jython have a ternary operator? I was unable to find it in the guide. edit: I am using weblogic's jython 2.2.1

Christos
  • 686
  • 3
  • 12
  • 21

1 Answers1

1

The a if condition else b syntax was added to the language in version 2.5. It is available in both CPython and Jython.

Jython 2.2.1 is too old and does not support this syntax.

mzjn
  • 45,711
  • 11
  • 120
  • 232