当前位置:网站首页>Differences between functions, methods and interfaces
Differences between functions, methods and interfaces
2022-07-21 19:24:00 【Hi~ sunny saint】
summary :
Functions are the packaging of statement sequences ;
Methods are operations on object members
An interface is an abstraction of a method , Methods implement specific interfaces ;
Specifically :
1、 function : Use the function name directly ( Parameters 1, Parameters 2,…) call
def functionName():
print(" This is a function ")
# call
functionName()
2、 Method : Called through object methods ( This refers to object methods )
class className:
def method(self):
print(" This is a way ")
# call
# Instantiate objects
c=className()
c.method()
边栏推荐
- MYSQL09_精讲数据库数据类型
- MYSQL06_ Seven join operations and union all of sql99
- China phosphorus pentachloride Market Research and investment forecast report (2022 Edition)
- Matrix
- MYSQL08_ Overview of sub query, single row, multi row, related sub query
- strcspn、strchr特殊字符校验
- Metahuman face shader summary
- 分布式.通用服务层缓存设计
- 分布式.BASE理论
- Software testing interview question: what is the task of testers in the process of software development?
猜你喜欢
随机推荐
Distributed High concurrency concepts and design goals
Hcip experiment the next day
Create high-performance applications and continuously optimize the user experience
Use the mogdb operator to deploy the mogdb cluster (mogdb stack) on kubernetes
MYSQL08_子查询的概述、单行、多行、相关子查询
QT (37) -mosquitto mqtt client
分布式.BASE理论
What is gamefi?
Software testing interview question: what work is usually done in each stage of software testing? What are the outcome documents of each stage? What is included?
Software test interview question: bug management tool tracking process (using bugzilla as an example)
ClickHouse深度揭秘
Practice and exploration of knowledge atlas question answering Technology
Software testing interview question: what do you think are the advantages of testing?
MYSQL06_ Seven join operations and union all of sql99
Getting to know Clickhouse for the first time -- installation and introduction
Phpstudy_pro搭建Sqli-labs靶场,进行SQL注入测试
How to realize copyright protection of Digital Collections
How to solve the problem of unable to establish SSL connection in WGet command
Software testing interview question: what is the strategy of software testing?
MYSQL07_获取日期函数、聚合函数、字符串函数