-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Milestone
Description
from wrapt import decorator
@decorator
def d1(wrapped, instance, args, kwargs):
print(f'd1: {args}, {kwargs}')
return wrapped(*args, **kwargs)
def d2(*argsT, **kwargsT):
@decorator
def d3(wrapped, instance, args, kwargs):
print(f'd3: {argsT}, {kwargsT}, {args}, {kwargs}')
return wrapped(*args, **kwargs)
return d3
@d1
@d2(a=int, b=str)
def hello():
print('hello')
Save above code as hello.py, use another module, import hello and call hello.hello(), all success.
import Cython.Build
import distutils.core
def py2c(file):
cpy = Cython.Build.cythonize(file)
distutils.core.setup(
name = 'test',
version = "1.0",
ext_modules= cpy,
author = "test",
author_email='test@163.com'
)
if __name__ == '__main__':
file = "hello.py"
py2c(file)
Save above code as py2c.py, run "python py2c.py build_ext --inplace" ,it generate hello.pyd, import again, raise TypeError.
Expect it run success and print "hello".
- OS: Windows 7
- Python version 3.6.8
- Cython version 0.29.22
Reactions are currently unavailable


