This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#_*_ conding:utf8 _*_ | |
def log(string): | |
if isinstance(string,str): | |
def decorator(func): | |
def wrapper(*args,**kw): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import functools | |
def log(func): | |
@functools.wraps(func) | |
def wrapper(*args, **kw): | |
print 'begin call' | |
func(*args, **kw) |