<div dir="ltr">Isn't it possible to implement it as a pure Python exception hook?</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 5, 2016 at 10:04 PM Ivan Levkivskyi <<a href="mailto:levkivskyi@gmail.com">levkivskyi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On 5 October 2016 at 20:55, Yury Selivanov <span dir="ltr" class="gmail_msg"><<a href="mailto:yselivanov.ml@gmail.com" class="gmail_msg" target="_blank">yselivanov.ml@gmail.com</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg"><span class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Speaking of, I'm not much of a C hacker, and messing with CPython internals<br class="gmail_msg">
is a little daunting. If anyone wants to take this on, you have my<br class="gmail_msg">
blessing. I also may take a shot at implementing this idea in the next<br class="gmail_msg">
couple weeks when I have some time.<br class="gmail_msg">
</blockquote>
<br class="gmail_msg"></span>
It would help if you could create an issue and write exhaustive unittests (or at least specifying how exactly the patch should work for all corner cases). Someone with the knowledge of CPython internals will later add the missing C code to the patch.<span class="m_7669710202106246035HOEnZb gmail_msg"><font color="#888888" class="gmail_msg"><br class="gmail_msg">
<br class="gmail_msg">
Yury</font></span><div class="m_7669710202106246035HOEnZb gmail_msg"><div class="m_7669710202106246035h5 gmail_msg"><br class="gmail_msg"></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg">I agree with Yury here. There are corner cases (like what to do with classmethods etc). If behaviour for all of them are specified, it would be quite straightforward to implement this.<br class="gmail_msg"><br class="gmail_msg">--<br class="gmail_msg"></div><div class="gmail_extra gmail_msg">Ivan<br class="gmail_msg"><br class="gmail_msg"></div></div>
_______________________________________________<br class="gmail_msg">
Python-ideas mailing list<br class="gmail_msg">
<a href="mailto:Python-ideas@python.org" class="gmail_msg" target="_blank">Python-ideas@python.org</a><br class="gmail_msg">
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" class="gmail_msg" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br class="gmail_msg">
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" class="gmail_msg" target="_blank">http://python.org/psf/codeofconduct/</a></blockquote></div>