Nice one :)
By the way you can turn classes into functions too:
class Foo: def __call__(self, a): print(f"Calling with a=", a) foo = Foo() foo(42)
Great! That's the needed comment to complement this article!
By the way you can do this:
In [1]: return_hello = lambda *args, **kwargs: 'hello' In [2]: class Foo(metaclass=return_hello): ... In [3]: Foo Out[3]: 'hello'
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice one :)
By the way you can turn classes into functions too:
Great! That's the needed comment to complement this article!
By the way you can do this: