News for hackers. Stuff that matters.
Re:Functools – The Power of Higher-Order Functions in Python by hutrdvnj on Friday July 09, 2021 @03:18AM (#27781215)
> 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()
Re:Functools – The Power of Higher-Order Functions in Python by ehsankia on Friday July 09, 2021 @11:05AM (#27784430)
I 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.