udim commented on a change in pull request #12009:
URL: https://github.com/apache/beam/pull/12009#discussion_r443073000



##########
File path: sdks/python/apache_beam/pvalue.py
##########
@@ -158,6 +158,10 @@ def __ne__(self, other):
   def __hash__(self):
     return hash((self.tag, self.producer))
 
+  def __class_getitem__(cls, type_param):

Review comment:
       I believe this method is unnecessary, since Generic[T] implements 
something similar. You can can inspect a PCollection to get its arguments.
   For example:
   ```
   >>> import typing
   >>> T = typing.TypeVar('T')
   >>> class A(typing.Generic[T]):
   ...   pass
   ... 
   >>> A[int].__args__
   (<class 'int'>,)
   ```
   




----------------------------------------------------------------
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.

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


Reply via email to