The my_module.py contains this code:
def external_func():
return [list comprehension]
I want import the external_func() in another file.
import external_func() from my_module
Now i want use a wrapper, or other way to change the return into iterator.
return iter(list comprehension)
Any suggestions are appreciate!
Read more here: https://stackoverflow.com/questions/65030351/change-return-of-external-function-python
Content Attribution
This content was originally published by Raffaele Ruggeri at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.