Author terry.reedy
Recipients jdemeyer, ncoghlan, rhettinger, terry.reedy
Date 2018-04-14.19:07:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I would like python_coded_callable.__code__ to be the code object executed when python_coded_callable is called, just as expected by the isxyz author(s).  It has to exist somewhere.  Methods m and m3 both return 42 when called, and both have the same code object.

>>> m3.__code__
<code object __call__ at 0x000001431C797E40, file "F:\Python\a\", line 3>
>>> m3.__func__.__code__
<code object __call__ at 0x000001431C797E40, file "F:\Python\a\", line 3>
>>> m.__func__.__call__.__code__
<code object __call__ at 0x000001431C797E40, file "F:\Python\a\", line 3>

The fact that m requires an additional level of indirection is an implementation detail that I don't think necessarily has to involve users.
Date User Action Args
2018-04-14 19:07:52terry.reedysetrecipients: + terry.reedy, rhettinger, ncoghlan, jdemeyer
2018-04-14 19:07:52terry.reedysetmessageid: <>
2018-04-14 19:07:52terry.reedylinkissue33261 messages
2018-04-14 19:07:52terry.reedycreate