06 2021 档案
摘要:【python】nonlocal关键字 ''' nonlocal关键字用来在函数或其他作用域中使用外层(非全局)变量。 ''' def work(): x = 0 def new_work(): nonlocal x x += 3 return x return new_work f=work()
阅读全文
搜索
最新随笔
- 1.【Python】datetime 时区转换, celery 结果 date_done比东八区晚8小时
- 2.【Linux】用Xshell通过SSH连接ubuntu报错“服务器发送了一个意外的数据包”
- 3.【Django】加密 settings.py文件中的数据库密码
- 4.【Python】python re模块判断密码的条件
- 5.【Python】 多层级嵌套循环
- 6.【Python】linux下 安装 matplotlib SimHei字体
- 7.【Python】pandas 读取 后向轨迹文件
- 8.【Python】geopandas 读取 shp/geojson 边界文件
- 9.【Python】在linux环境下, Django 3.0+版本遇到的一些问题
- 10.【Linux】文件可执行权限