Enum FutureFeature

java.lang.Object
java.lang.Enum<FutureFeature>
org.python.core.FutureFeature
All Implemented Interfaces:
Serializable, Comparable<FutureFeature>, java.lang.constant.Constable, Pragma

public enum FutureFeature extends Enum<FutureFeature> implements Pragma
  • Enum Constant Details

    • nested_scopes

      public static final FutureFeature nested_scopes
      Enables nested scopes.
    • division

      public static final FutureFeature division
      Makes integer / integer division return float.
    • generators

      public static final FutureFeature generators
      Enables generators.
    • absolute_import

      public static final FutureFeature absolute_import
      Enables absolute imports.
    • with_statement

      public static final FutureFeature with_statement
      Enables the with statement.
    • unicode_literals

      public static final FutureFeature unicode_literals
      Enables unicode literals.
    • braces

      public static final FutureFeature braces
      Use braces for block delimiters instead of indentation.
    • GIL

      public static final FutureFeature GIL
      Enable the Global Interpreter Lock in Jython.
    • global_interpreter_lock

      public static final FutureFeature global_interpreter_lock
      Enable the Global Interpreter Lock in Jython.
  • Field Details

  • Method Details

    • values

      public static FutureFeature[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static FutureFeature valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • addTo

      public void addTo(PragmaReceiver features)
      Specified by:
      addTo in interface Pragma
    • addFeature

      public static void addFeature(String featureName, PragmaReceiver features)
    • setFlag

      public void setFlag(CompilerFlags cflags)