当前位置:网站首页>__ call__ function
__ call__ function
2022-07-22 15:49:00 【Pr Young】
No, __call__ function :
class Person:
def hello(self,name):
print("hello"+name)
person=Person()
person.hello(“lisi”)
# Output gets :hellolisi
Yes __call__ function :
class Person:
def __call__(self,name):
print("hello"+name)
person=Person("lisi")
# Output gets :hellolisi
That is to say __call__ A function is actually a constructor
边栏推荐
- rsync下行同步+inotify实时同步部署
- Deep learning 8 deep model optimization and regularization 2
- Code shoe set - mt2201 · sum of all
- 第三章第五节:返回值
- ctfshow MengXIn 下
- C language outputs the number of all daffodils
- Design of SKU database for commodity information
- JS数组对象排序(es6)
- 微信小程序实现PDF预览功能——pdf.js(含源码解析)
- Tdengine experimental cluster establishment success
猜你喜欢
Pull daily activities, use cloud functions to send wechat applet subscription messages
img.shape[-2:]/len(img.shape[-2:]):GeneralizedRCNN:original_ image_ Torch in sizes_ assert
pyside2做个简易的浏览器
Nifi 1.16.3 updates and bugs used in production.
浏览器无痕浏览还能查到记录吗,如何开启无痕模式
Record a summary of JMeter pressure test practice
Cookies and sessions
10 automated test frameworks for test engineers
BannerText(水印文本)
认识垃圾回收
随机推荐
ctfshow MengXIn 下
TiDB中规划的集群包括6个DB,3个pd,3个kv,应用去连的时候,是连哪个地址?
认识垃圾回收
Basic concept of Nacos and single machine startup
OUU益生菌精耕胃肠健康,获奖天猫国际微生态创新大会
Deep learning 8 deep model optimization and regularization 2
Winning tickets on the "code" -- the second bullet of ticket purchase welfare at tdengine Developer Conference
高中学历自学测试,21岁在深圳拿10k,付出多少只有我自己知道~
商品信息SKU数据库设计
Tdengine learning notes
Exponential moving average method_ Baidu Encyclopedia
Liunx环境
【Error】解决:Not creating XLA devices, tf_xla_enable_xla_devices not set
MySQL进阶的增删改查操作,包含各类查询的详细解释和操作以及表的设计讲解
The simple use of ADB command combined with monkey is super detailed
别找了,全都帮你整理好了——SQL语句大全
码蹄集 - MT3182 - 填矩阵
2022.7.21 special matrix compression
C language to write 99 multiplication table to realize the output of tables with different triangle shapes
EACCES: permission denied, unlink ‘/usr/local/bin/code‘