apache_beam.typehints.opcodes module¶
Defines the actions various bytecodes have on the frame.
Each function here corresponds to a bytecode documented in https://docs.python.org/2/library/dis.html or https://docs.python.org/3/library/dis.html. The first argument is a (mutable) FrameState object, the second the integer opcode argument.
Bytecodes with more complicated behavior (e.g. modifying the program counter) are handled inline rather than here.
For internal use only; no backwards-compatibility guarantees.
- apache_beam.typehints.opcodes.resume(unused_state, unused_arg)¶
- apache_beam.typehints.opcodes.unary_positive(state, unused_arg)¶
- apache_beam.typehints.opcodes.unary_negative(state, unused_arg)¶
- apache_beam.typehints.opcodes.unary_invert(state, unused_arg)¶
- apache_beam.typehints.opcodes.binary_power(state, unused_arg)¶
- apache_beam.typehints.opcodes.inplace_power(state, unused_arg)¶
- apache_beam.typehints.opcodes.binary_multiply(state, unused_arg)¶
- apache_beam.typehints.opcodes.inplace_multiply(state, unused_arg)¶
- apache_beam.typehints.opcodes.binary_divide(state, unused_arg)¶
- apache_beam.typehints.opcodes.inplace_divide(state, unused_arg)¶
- apache_beam.typehints.opcodes.binary_floor_divide(state, unused_arg)¶
- apache_beam.typehints.opcodes.inplace_floor_divide(state, unused_arg)¶
- apache_beam.typehints.opcodes.inplace_true_divide(state, unused_arg)¶
- apache_beam.typehints.opcodes.binary_modulo(state, unused_arg)¶
- apache_beam.typehints.opcodes.inplace_modulo(state, unused_arg)¶
- apache_beam.typehints.opcodes.binary_add(state, unused_arg)¶
- apache_beam.typehints.opcodes.inplace_add(state, unused_arg)¶
- apache_beam.typehints.opcodes.binary_subtract(state, unused_arg)¶
- apache_beam.typehints.opcodes.inplace_subtract(state, unused_arg)¶
- apache_beam.typehints.opcodes.binary_lshift(state, unused_arg)¶
- apache_beam.typehints.opcodes.inplace_lshift(state, unused_arg)¶
- apache_beam.typehints.opcodes.binary_rshift(state, unused_arg)¶
- apache_beam.typehints.opcodes.inplace_rshift(state, unused_arg)¶
- apache_beam.typehints.opcodes.binary_and(state, unused_arg)¶
- apache_beam.typehints.opcodes.inplace_and(state, unused_arg)¶
- apache_beam.typehints.opcodes.binary_xor(state, unused_arg)¶
- apache_beam.typehints.opcodes.inplace_xor(state, unused_arg)¶
- apache_beam.typehints.opcodes.binary_or(state, unused_arg)¶
- apache_beam.typehints.opcodes.inplace_or(state, unused_arg)¶
- apache_beam.typehints.opcodes.binary_op(state, unused_arg)¶
- apache_beam.typehints.opcodes.store_slice(state, args)[source]¶
Clears elements off the stack like it was constructing a container, but leaves the container type back at stack[-1] since that’s all that is relevant for type checking.
- apache_beam.typehints.opcodes.print_item(state, unused_arg)¶
- apache_beam.typehints.opcodes.print_newline(unused_state, unused_arg)¶
- apache_beam.typehints.opcodes.load_locals(state, unused_arg)¶
- apache_beam.typehints.opcodes.exec_stmt(state, unused_arg)¶
- apache_beam.typehints.opcodes.build_class(state, unused_arg)¶
- apache_beam.typehints.opcodes.store_attr(state, unused_arg)¶
- apache_beam.typehints.opcodes.delete_attr(state, unused_arg)¶
- apache_beam.typehints.opcodes.store_global(state, unused_arg)¶
- apache_beam.typehints.opcodes.delete_global(unused_state, unused_arg)¶
- apache_beam.typehints.opcodes.load_name(state, unused_arg)¶
- apache_beam.typehints.opcodes.dict_merge(state, arg)¶
- apache_beam.typehints.opcodes.load_attr(state, arg)[source]¶
Replaces the top of the stack, TOS, with getattr(TOS, co_names[arg])
Will replace with Any for builtin methods, but these don’t have bytecode in CPython so that’s okay.
- apache_beam.typehints.opcodes.load_method(state, arg)[source]¶
Like load_attr. Replaces TOS object with method and TOS.
- apache_beam.typehints.opcodes.is_op(state, unused_arg)¶
- apache_beam.typehints.opcodes.contains_op(state, unused_arg)¶
- apache_beam.typehints.opcodes.import_from(state, unused_arg)¶
- apache_beam.typehints.opcodes.store_map(state, unused_arg)¶
- apache_beam.typehints.opcodes.load_fast_check(state, arg)¶
- apache_beam.typehints.opcodes.make_function(state, arg)[source]¶
Creates a function with the arguments at the top of the stack.
- apache_beam.typehints.opcodes.build_list_unpack(state, arg)[source]¶
Joins arg count iterables from the stack into a single list.
- apache_beam.typehints.opcodes.build_set_unpack(state, arg)[source]¶
Joins arg count iterables from the stack into a single set.
- apache_beam.typehints.opcodes.build_tuple_unpack(state, arg)[source]¶
Joins arg count iterables from the stack into a single tuple.