1

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
  • 846
  • 3
  • 15
  • 21

1 Answers1

2

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
  • 48,958
  • 13
  • 128
  • 248