Skip to content

Commit 9106c6d

Browse files
committed
Update README.md
1 parent cbedf77 commit 9106c6d

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,34 @@
11
#python语言特性
22
>##参数类型
33
4-
>##闭包tuple和数组list
4+
>##元祖tuple和数组list
55
66
>##切片
77
8+
>##函数式编程
9+
1. ###基本类型作为参数
10+
2. ###把函数作为参数
11+
12+
>##高级函数
13+
1. ###sorted
14+
2. ###reduce
15+
3. ###map
16+
4. ###闭包closure
17+
5. ###匿名函数:map(lambda x :x*x,[1,2,3])
18+
只能有一个表达式,不写return,返回值就是该表达式的结果
19+
6. ###cmp(x,y)
20+
7. ###装饰器decorator
21+
* ####@log打印日志
22+
* ####@performance检测性能
23+
* ####@transaction数据库事务
24+
* ####@post('/register')URL路由
25+
8. ###带参数的装饰器decorator
26+
9. ###完善decorator装饰器,函数对应属性更新
27+
10. ###偏函数functools.partial可以把一个参数多的函数变成一个参数少的新函数,少的参数需要在创建时指定默认值。
28+
29+
>#模块
30+
##包文件下必须有__init__.py文件
31+
832
#python学习资源
933

1034
>##慕课网:在线it教育MOOC

0 commit comments

Comments
 (0)