Toggle navigation
Sunday Blog
All Posts
go
kubernetes
linux
python
ARCHIVE
DOCS
ABOUT
Sunday Blog
人生是一场刻意练习
Python 装饰式和偏函数
Python Decorator and Partial
装饰器 要讲清楚装饰器,首先要知道一些前置概念。下文涉及到这些概念的地方,会展开讲述。 什么是装饰器? 装饰器是一种AOP(面向切面编程)的设计模
Posted by BlueFat on Saturday, August 27, 2022
Python 闭包
Python Closures
闭包 def counter(): c=[0] def inc(): c[0]+=1 return c[0] return inc # 函数对象 foo=counter() print(foo(),foo(),foo()) c=100 print(foo()) 1 2 3 4 return inc() 不可以用(),返回结果,会消亡 counter生成c和inc,消亡,但c inc被foo引
Posted by BlueFat on Saturday, August 13, 2022
开心的蓝胖
QUICK LINKS
Pxhere
unsplash
FEATURED TAGS
ansible
bash
calico
containerd
docker
firewalld
flannel
grpc
https
iptables
keepalived
kernel
kubernetes
linux
lvs
mysql
network
nginx
prometheus
python
rabbitmq
rocketmq
shell
sort
ssh
tcp
tcpdump
ubuntu
ufw
性能
排序
正则表达式
算法
递归
闭包
FRIENDS
Sunday Docs
Ansible Wiki
K8S训练营
Kubernetes 实践指南