Message241530
| Author |
ionelmc |
| Recipients |
Claudiu.Popa, belopolsky, christian.heimes, eric.snow, ethan.furman, ionelmc, jedwards, llllllllll, r.david.murray, terry.reedy |
| Date |
2015年04月19日.18:28:19 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CANkHFr8B_YCBw29=3j2bH0bafDfsWS+G0RkGGPDfqUUBVe9bUA@mail.gmail.com> |
| In-reply-to |
<CALFfu7C-KYVR7h1gb0o60ThC5pqdY6USrjNAx1p5Lt35cng43A@mail.gmail.com> |
| Content |
On Sun, Apr 19, 2015 at 9:01 PM, Eric Snow <report@bugs.python.org> wrote:
> Finally, instead of changing callable, why not use a metaclass that does
> the right thing? I believe MagicMock does something along those lines.
>
What would be the "right thing"? AFAIK this cannot be achieved with a
metaclass, since the check in `callable` just does a dumb check for
`x->ob_type->tp_call`. Seriously, if you know a way to make
`x->ob_type->tp_call` run any python code please let me know :-)
Thanks,
-- Ionel Cristian Mărieș, http://blog.ionelmc.ro |
|