tvalentyn commented on code in PR #35656:
URL: https://github.com/apache/beam/pull/35656#discussion_r2258291420
##########
sdks/python/apache_beam/internal/code_object_pickler.py:
##########
@@ -95,13 +105,16 @@ def _extend_path(prefix, suffix):
return prefix + '.' + suffix
-def _search(callable, node, qual_name_parts):
+def _search(
+ callable: types.FunctionType, node: object, qual_name_parts: list[str]):
"""Searches an object to create a stable reference code path.
Recursively searches the tree of objects starting from node and looking for
callable and returns a string to uniquely identify the path from node to the
callable.
+ Example of qual_name_parts: ['MyClass', 'process', '<locals>', '<lambda>']
Review Comment:
> Recursively searches the tree of objects starting from node and looking
for
callable and returns a string to uniquely identify the path from node to
the
callable.
Thanks for adding an example for qual_name_parts. Could you also make it
clear on what is the purpose of having qual_name_parts as arguments in the
_search function?
--
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]