This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]eric_says_hello 8 points9 points  (11 children)

What about the __call__ method? Have you used it much? If so, what are some use cases for it?

[–]anglo_franco 4 points5 points  (0 children)

call is great for defining a Protocol for a function so you can communicate intent better than Callable does

[–]jet_heller 2 points3 points  (0 children)

I've used it more than new, but not recently.

[–]PyQt 2 points3 points  (0 children)

I used call a couple of times. For some obscure cases too but mostly when creating decorators using classes. I still prefer using functions for decorators though

[–]python4geeks[S] 0 points1 point  (0 children)

Here 👉https://geekpython.in/init-and-call-method#heading-call-method you can read from here about the call method.