Is it possible to put a generator that always returns 'True' in one line? The reason for that being is that it should be a default parameter in a function or is there a way to use these parameters having multiple lines?
This should be the default argument of a function:
def example_function(generator= (def gen():
while True:
yield True)):
print("In my function")
The code with that indentation shows the following syntax error:
def example_function(generator= (def gen():
^