Python随手记:argument 与parameter区别

根据网上一些资料,对parameter和argument的区别,做如下的简单说明。

  1. parameter是指函数定义中参数,而argument指的是函数调用时的实际参数。
  2. 简略描述为:parameter=形参(formal parameter), argument=实参(actual parameter)。
  3. 在不很严格的情况下,现在二者可以混用,一般用argument,而parameter则比较少用。
    While defining method, variables passed in the method are called parameters.
    当定义方法时,传递到方法中的变量称为参数.
    While using those methods, values passed to those variables are called arguments.
    当调用方法时,传给变量的值称为引数.(有时argument被翻译为“引数“)

简单来说,实参:argument;形参:parameter

time模块是与时间有关的模块,时间有关的模块还有两个

Python 中时间表示的方法有三种:

  • 时间戳
  • 格式化时间字符串
  • 元组(struct_time)

其实这些不用记,随时看源码,知道用法

主要讲一些函数:

time.sleep() 线程推迟指定时间运行

猜你喜欢

转载自blog.csdn.net/JessePinkmen/article/details/83011626