Message315302
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\tem2.py", line 3>
>>> m3.__func__.__code__
<code object __call__ at 0x000001431C797E40, file "F:\Python\a\tem2.py", line 3>
>>> m.__func__.__call__.__code__
<code object __call__ at 0x000001431C797E40, file "F:\Python\a\tem2.py", 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:52 | terry.reedy | set | recipients:
+ terry.reedy, rhettinger, ncoghlan, jdemeyer |
2018-04-14 19:07:52 | terry.reedy | set | messageid: <1523732872.53.0.682650639539.issue33261@psf.upfronthosting.co.za> |
2018-04-14 19:07:52 | terry.reedy | link | issue33261 messages |
2018-04-14 19:07:52 | terry.reedy | create | |
|