Ionel Cristian Mărieș added the comment: On Sun, Apr 19, 2015 at 9:01 PM, Eric Snow <rep...@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 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23990> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com