TheNeuralBit commented on code in PR #22899:
URL: https://github.com/apache/beam/pull/22899#discussion_r955562867


##########
sdks/python/apache_beam/typehints/row_type.py:
##########
@@ -123,6 +123,12 @@ def from_fields(
         field_options=field_options,
         schema_registry=schema_registry)
 
+  def __call__(self, *args, **kwargs):
+    # We make RowTypeConstraint callable (defers to constructing the user type)

Review Comment:
   I'm not sure if there's a better reference on this, but the CPython 
implementation explicitly considers anything that's callable a type:
   
https://github.com/python/cpython/blob/d348afa15d5a997e7a8e51c0f789f41cb15cc651/Lib/typing.py#L137-L167



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to