casassg commented on a change in pull request #8962:
URL: https://github.com/apache/airflow/pull/8962#discussion_r428968991



##########
File path: airflow/models/xcom_arg.py
##########
@@ -83,7 +83,7 @@ def __getitem__(self, item):
         """
         Implements xcomresult['some_result_key']
         """
-        return XComArg(operator=self.operator, key=item)
+        return XComArg(operator=self.operator, key=str(item))

Review comment:
       Key will always be a string as it's casted when pushing the field to the 
XCom DB. This is just to make things easier to use when doing multiple_outputs 
also to ensure consistency. This allows you to do:
   ```
   res[1]
   ```
   Which in reality is more transparent.
   
   It was a change we missed in #8652




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