3 ms·
> move its definition outside the point You can define a named function inside a named function and thus limiting its scope. def outer_func(): def inn
by hutrdvnj 5y ago
> move its definition outside the point
You can define a named function inside a named function and thus limiting its scope.
def outer_func():
def inner_func():
print("hi")
inner_func()
- ehsankia 5y agoI honestly prefer that, anything function longer than a line probably could use a name that gives it some context, even maybe a short docstring, to make the code more readable.