1、函数在传递实参的时候是传递的是引用而不是从内存中重新赋相同值给形参。
2、函数名带圆括号和不带圆括号。函数名带圆括号是函数的调用,而函数名代表的是函数体
3、函数返回值,在函数没有返回值的时候默认是None。
4、python 中的False:0、False、[]、{}、()、''、""。空列表、空字典、空字符创、空元组都是False.
二:内置函数
1:callable()该函数检测对象是否可以被调用。不常用这个函数。
2:chr()是把数字转换成对应的字母。
   ord()是把对应的字母转成数字。
3、exec('print(2);import os;print os.dir')执行一连串命令;eval('2*2+3')执行表达式
4、dir(list)、help(list);dir显示函数方法和函数、help的帮助信息更详细
5、装饰器
语法:@函数名
自动执行outer()函数并且将下面的函数f1当做参数传递。
将outer函数的返回值,重新赋值给f1。
执行顺序:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAi8AAAE8CAIAAACHHMa7AAAgAElEQVR4nO2dW3Abdb7ne84sMEBgmBkmCeMQCLlAyI3YSex2HN9kSX2rhOd5gBeqXzacrbxC1civhKquPJwxMI+8QFF+OSF0bW2qqPXadWpP8ZLCp/DQZY1RbLxaHXu0ppFtyc70PrTU9261rv+W9P3Ur4ykvv2tUP3x7/f/dTclCIIgCDzPcxzHsmzi6oVXXnnlzJXxkZGRRJKLWLDhflaLhNdPspHk9BfxcOvHXWvGE+wLA4lD/WacvsoIgnD6KmN88sJAIl7ZthLJY+eS15wfMmfOJS45PhlMOra9Nhg/NmK+PjTIBL+OJ9j4RPLQa1MHXktcSrAjg/EDr8XPTLCuIbHxieShc8kR+4cjxuFGEgf6nYOJJ9hL/VPGeHoqpvx/Vo+45af7kzjJGB2LsWyCZRMclxB4xho8z3BskmHiPJcUeIbnkhyXYNkEzyd5PslzSY5NcEyc5xKCwAg8w3OcwPMcxzFcjOUZXuBYJsnEx5PMlMCxnMByHMMySYaZSnKTPJfkBYZjE2xiiklOcVxCEBieT7JsnGWTHJsU+KTAJQUuIfBJgU/w3FQ8EWeYBMvFxkavPfn409QvHvvlLx7rO/DsoSefuPzaKYHjOUFIjI8dfO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AAgC6g1XcGatXVrwAAALqJ1t+nrjV3BgIAANBNUIIgCILA8zzHcSzLJhKJWCw2Pj4+MjKSSHLWePyxfxL4qeDg2KClQ4PDg4NXx8fGLvfT166NJWLjF9+gJyfHLw1cHbo8zCQnLw8Mj09MCNzklcv95a24yYFR+vzVwaGJq1fGrl6dGtM/v3RtaGhiZHji2sAoPTA6PJUcPzM8OJkYvzw6PDA2HEuMnhkeiicn9KU8F9O3oi+/wVZeM1zs1UQsxsaSXGyKjU2xsRgbG2dj42xslI1dZWJXmdgwExusxOVk7DITu8LEhpjYCBMbY2PjbCzOxpJcjKvsM/rxxOO/jCdYRH0xFe5n+yJe7Wf1YKr9rCFicTb4Z00xOhaLxdkkwxGMRNLyk/H4WT2S4X4iklxbbXTt6rXJ2ESYkyaTGG/FudjYLcdNvTA1+cTk5FOTk8/GJn8Xmzw8NXlkKvZyPHYyETudiJ1PxPqTsUEmdpWJjbGxGBtLcFMcR14nsFHEhdRRKmqmkKqqqFYhEbdRVRU1TUiIemxUDY7jqq4TEXhBuMQw450z4KYAG7VURR0oJORGyI2iEr1ro94ENmq1kDpKRciNkBtFKP4/aIflX6sNfYYAAAAASUVORK5CYII=" alt="" />
python执行顺序是,从上到下,先将outer函数加载到内存,然后把函数f1加载到内存。在执行f1的时候,由于f1被outer装饰,f1作为实参赋值给outer函数的形参func,然后将outer函数的返回函数inner赋值给f1,
所以执行inner函数,因为到func()的调用时候,执行f1的旧函数的函数体,也就是7,执行完在执行第8步,如果f1有返回值,那么inner函数将返回相同的返回值。
 

python的几个概念的更多相关文章

  1. Python学习:基本概念

    Python学习:基本概念 一,python的特点: 1,python应用场景多;爬虫,网站,数据挖掘,可视化演示. 2,python运行速度慢,但如果CPU够强,这差距并不明显. 3,严格的缩进式编 ...

  2. python面向对象编程 -- 基本概念

    面向对象的编程简要概括就是将要处理的问题抽象为数据和操作的集合,用类对其进行封装.其中数据和操作都称为类的属性,它们是一般是不变的. 对类进行实例化生成我们所说的对象,对象有自己的属性.对象的属性一般 ...

  3. python 中面向对象的概念

    原文 域和作用空间 本地域,函数域(nonlocal)和 全局域(global) def scope_test(): def do_local(): spam = "local spam&q ...

  4. Python错误和异常概念(总)

    转载请标明出处: http://www.cnblogs.com/why168888/p/6435956.html 本文出自:[Edwin博客园] Python错误和异常概念(总) 1. 错误和异常的处 ...

  5. 『Python题库 - 简答题』 Python中的基本概念 (121道)

    ## 『Python题库 - 简答题』 Python中的基本概念 1. Python和Java.PHP.C.C#.C++等其他语言的对比? 2. 简述解释型和编译型编程语言? 3. 代码中要修改不可变 ...

  6. python里类的概念

    Python编程中类的概念可以比作是某种类型集合的描述,如"人类"可以被看作一个类,然后用人类这个类定义出每个具体的人--你.我.他等作为其对象.类还拥有属性和功能,属性即类本身的 ...

  7. python基础整理----基本概念和知识

    整理一下python的基本概念和知识, 主要用python3为语法标准. python介绍 一种面向对象的解释性计算机设计语言,具有丰富和强大的库. python定位:"优雅".& ...

  8. Python super() 函数的概念和例子

    概念: super() 函数是用于调用父类(超类)的一个方法. super 是用来解决多重继承问题的,直接用类名调用父类方法在使用单继承的时候没问题,但是如果使用多继承,会涉及到查找顺序(MRO).重 ...

  9. python的一些基本概念知识和面试题

    对于机器学习算法工程师而言,Python是不可或缺的语言,它的优美与简洁令人无法自拔.那么你了解过Python编程面试题吗?从Python基础到网页爬虫你是否能全方位Hold住?今天,机器之心为读者们 ...

  10. 【Python】【一些概念与对比】

    type.__new__()  : 返回类.可以把类看作是metaclass 创建出来的实例 普通类里的__new__() : 返回类的实例. __new__() : 返回类的实例.Python解释器 ...

随机推荐

  1. hexo从零开始到搭建完整 转

    http://visugar.com/2017/05/04/20170504SetUpHexoBlog/ https://liuchi.coding.me/   look me 交流群 有相关问题的可 ...

  2. SQLServer对视图或函数’XXX’的更新或插入失败,因其包含派生域或常量域解决

    原因:视图view不允许修改. 解决:重新创建一个相同结构内容的表. 解释:因为所创建的视图对其属性值进行了计算的其他形式上的改变,而对视图的更改最终表现为对表的更改而表中不存在视图的某一属性,或属性 ...

  3. Java String学习笔记

    参照:https://www.jianshu.com/p/2f209af80f84 常量池: Java代码被编译成class文件时,会生成一个常量池(Constant pool)的数据结构,用以保存字 ...

  4. P1023 税收与补贴问题

    题目背景 每样商品的价格越低,其销量就会相应增大.现已知某种商品的成本及其在若干价位上的销量(产品不会低于成本销售),并假设相邻价位间销量的变化是线性的且在价格高于给定的最高价位后,销量以某固定数值递 ...

  5. url为什么要编码及php中的中文字符urlencode基本原理

    首先了解以下中文字符在使用urlencode的时候运用的基本原理: urlencode()函数原理就是首先把中文字符转换为十六进制,然后在每个字符前面加一个标识符%. 此字符串中除了 -_. 之外的所 ...

  6. Codeforces Round #324 (Div. 2) D

    D. Dima and Lisa time limit per test 1 second memory limit per test 256 megabytes input standard inp ...

  7. CSU 2031

    2031: Barareh on Fire Submit Page   Summary   Time Limit: 3 Sec     Memory Limit: 512 Mb     Submitt ...

  8. 简易web服务器(npm)

    npm install -g http-server 以后可以在任何一个文件夹启动静态文件的访问通过http-server -a localhost -p 8000ctrl + c结束 http-se ...

  9. 动态符号链接的细节 与 linux程序的加载过程

    转: http://hi.baidu.com/clivestudio/item/4341015363058d3d32e0a952 值得玩味的一篇分析程序链接.装载.动态链接细节的好文档 导读: by ...

  10. kvm虚拟机最佳实践系列2-创建KVM及KVM优化

    创建KVM及KVM优化 把KVM优化与KVM创建放在一起,是因为我们创建的KVM是要用在生产环境中,所以基础优化工作是必备的. 创建KVM 创建系统盘, 大小: 操作系统通常都不到10G,所以系统盘2 ...