From: Alan K. <jyt...@xh...> - 2005-10-12 18:14:42
|
[Alan Kennedy] >> However, I see that your cpython test code makes use of python 2.4 >> decorators, which are not yet available in jython, so I'd have to >> refactor your code to use pre-2.4 decorators (unless someone knows of >> any syntactical hacks that make 2.4 decorators work under pre-2.4 >> syntax?) [Kent Johnson] > Maybe you know this, but > > @someDecorator > def myFunc(): > ... > > can be replaced with > def myFunc(): > ... > myFunc = someDecorator(myFunc) > > The decorator syntax is just sugar for the second form. Thanks Kent, I was aware of that. I was hoping there might be some hack that might make it possible for me to run Scott's code without modification, i.e. without changing the text of his modules. But my primary approach for now is going to be using a different port number for each test. I'll worry about other test suites later. Regards, Alan. |