[ 
https://issues.apache.org/jira/browse/BEAM-3143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16273930#comment-16273930
 ] 

ASF GitHub Bot commented on BEAM-3143:
--------------------------------------

luke-zhu commented on a change in pull request #4183: [BEAM-3143] Type 
Inference Python 3 Compatibility
URL: https://github.com/apache/beam/pull/4183#discussion_r154266327
 
 

 ##########
 File path: sdks/python/apache_beam/typehints/opcodes.py
 ##########
 @@ -261,13 +264,22 @@ def build_list(state, arg):
 
 
 def load_attr(state, arg):
+  """Replaces the top of the stack, TOS, with with
+  getattr(TOS, co_names[arg])
+  """
   o = state.stack.pop()
   name = state.get_name(arg)
   if isinstance(o, Const) and hasattr(o.value, name):
     state.stack.append(Const(getattr(o.value, name)))
   elif (isinstance(o, type)
 
 Review comment:
   I was not able to handle the nested class case so I stayed with a subset of 
callable types.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Fix type inference in Python 3 for generators
> ---------------------------------------------
>
>                 Key: BEAM-3143
>                 URL: https://issues.apache.org/jira/browse/BEAM-3143
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: holdenk
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to