Re: im_func used in python3/omniidl_be/python.py
Duncan Grisby via omniORB-list <[email protected]> Sun, 02 Jun 2019 22:31:24 +0100
| Newsgroups | gmane.comp.corba.omniorb.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 2019-05-06 at 18:45 +0200, Guilhem Saurel via omniORB-list wrote: > Using Python 3 and a custom python backend¹, I got the following > error: > > AttributeError: 'function' object has no attribute 'im_func' > > Python 2to3 porting guide² seems to indicate that 'im_func' no longer > exists in Python 3. > > So I tried to remove it³, and it fixed my use case. Yes, it is a bug. The generated stub code is intended to work with both Python 2 and Python 3, so the complete fix is to use a new function to handle setting the docstring correctly, rather than have different generated code between Python 2 and 3. The fix is in svn, in the 4_2 branch. Thanks, Duncan. -- -- Duncan Grisby -- -- [email protected] -- -- http://www.grisby.org -- _______________________________________________ omniORB-list mailing list [email protected] http://www.omniorb-support.com/mailman/listinfo/omniorb-list