python3 装饰器
来源:互联网 发布:mac ios 配置 jenkins 编辑:程序博客网 时间:2024/06/02 02:52
def outter(func):
@functools.inner(func) #这样不影响传入的参数
def inner(*arg):
print("请输入密码")
password = input("password : ")
if password == 'qwe' :
func(*arg)
else :
print("密码不正确")
return inner
@outter
def success():
print("登录成功")
success()
@functools.inner(func) #这样不影响传入的参数
def inner(*arg):
print("请输入密码")
password = input("password : ")
if password == 'qwe' :
func(*arg)
else :
print("密码不正确")
return inner
@outter
def success():
print("登录成功")
success()
阅读全文
0 0
- python3 装饰器
- Python3 装饰器
- Python3之装饰器
- python3 核心 装饰器
- python3 装饰器
- Python3 装饰器
- Python3 装饰器
- python3.3 装饰器日志
- python3学习笔记:装饰器
- Python3 基础:装饰器和偏函数
- Python3学习(17)--装饰器decorator
- 解除装饰器作用(python3新增)
- Python3学习(24)--内置装饰器@property
- Python3.5——装饰器之案例剖析
- python3.5函数的参数样式种类以及装饰器
- python 9-3 如何定义带参数的装饰器,提取函数签名python3 inspect.signature()
- Python3.5——装饰器及应用详解(上)
- Python3.5——装饰器及应用详解(下)
- 三 无限轮播 有原点
- Java 编译器代码定义的 Token 保留字
- Java 编译器代码定义的 Java语言的类型 Types
- bagofwords tf-idf word2vec特征实践
- java代码执行过程简介
- python3 装饰器
- 第1章 JVM语言家族概览 《Kotin 编程思想·实战》
- 第2章 Kotlin简介 《Kotin 编程思想·实战》
- 第3章 快速开始:HelloWorld 《Kotin 编程思想·实战》
- 第4章 kotlin代码执行过程《Kotin 编程思想·实战》
- 服务器安装好tomcat之后,启动无法通过ip访问
- 除了清空购物车,阿里年会的技术也超霸气!
- 第5章 Kotlin语言基础 《Kotin 编程思想·实战》
- HDU 1050 Moving Tables