tvalentyn commented on code in PR #34870:
URL: https://github.com/apache/beam/pull/34870#discussion_r2078622721


##########
sdks/python/apache_beam/typehints/opcodes.py:
##########
@@ -582,19 +616,31 @@ def build_slice(state, arg):
   state.stack[-arg:] = [slice]  # a slice object
 
 
+def to_bool(state, arg):
+  state.stack[-1] = bool
+
+
 def format_value(state, arg):
   if arg & 0x04:
     state.stack.pop()
   state.stack.pop()
   state.stack.append(str)
 
 
+def convert_value(state, arg):
+  state.stack.pop()
+  state.stack.append(str)
+
+
 def format_simple(state, arg):
-  state.stack[-1:][str]

Review Comment:
   for my education what's the impact of prior implementation 
`state.stack[-1:][str]`  ?



##########
sdks/python/apache_beam/typehints/opcodes.py:
##########
@@ -490,6 +490,13 @@ def load_fast(state, arg):
   state.stack.append(state.vars[arg])
 
 
+def load_fast_load_fast(state, arg):
+  arg1 = arg >> 4
+  arg2 = arg & 15

Review Comment:
   consider including links to opcode defs, like 
https://docs.python.org/3/library/dis.html#opcode-LOAD_FAST_LOAD_FAST, so it's 
easier to reason about the referenced constants.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to