What is __call__

call allows you to treat an instance of a class as a function.

class Print:
    def __call__(self, a):
        print(a)

b = Print()
b('aiueo')

output

aiueo

Recommended Posts

What is __call__
What is a system call
What is namespace
What is copy.copy ()
What is Django? .. ..
What is dotenv?
What is POSIX?
What is Linux
What is SALOME?
What is python
What is hyperopt?
What is Linux
What is pyvenv
What is Linux
What is Python
What is a distribution?
What is Piotroski's F-Score?
What is Raspberry Pi?
[Python] What is Pipeline ...
What is Calmar Ratio?
What is hyperparameter tuning?
What is a hacker?
What is Linux for?
What is ensemble learning?
What is Python's __init__.py?
What is an iterator?
What is UNIT-V Linux?
[Python] What is virtualenv
What is machine learning?
What is Minisum or Minimax?
What is Linux? [Command list]
What is Logistic Regression Analysis?
What is the Linux kernel?
What is a decision tree?
What is a Context Switch?
What is Google Cloud Dataflow?
[DL] What is weight decay?
What is a super user?
Competitive programming is what (bonus)
[Python] * args ** What is kwrgs?
[Definition] What is a framework?
What is the interface for ...
What is Project Euler 3 Acceleration?
What is a callback function?
What is the Callback function?
What is a python map?
What is your "Tanimoto coefficient"?
Python Basic Course (1 What is Python)
What is Python? What is it used for?
[Python] What is a zip function?
[Python] What is a with statement?
What is labeling in financial forecasting?
What is Azure Automation Update Management?
[Python] What is @? (About the decorator)
What is a lexical scope / dynamic scope?
What is a Convolutional Neural Network?
After all, what is statistical modeling?
What is scraping? [Summary for beginners]
What kind of Kernel is this Kernel?
Python for statement ~ What is iterable ~
What is the X Window System?