<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 17, 2017 at 8:56 AM, Dong-hee Na <span dir="ltr"><<a href="mailto:donghee.na92@gmail.com" target="_blank">donghee.na92@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Few days ago, I submitted a patch(<a href="https://github.com/python/cpython/pull/4417" rel="noreferrer" target="_blank">https://github.com/<wbr>python/cpython/pull/4417</a>) which updates2to3 converts `operator.isCallable(obj)` to `isinstance(obj, collections.abc.Callable)`.<br>
<br>
This was Serhiy Storchaka’s idea(<a href="https://bugs.python.org/issue32046" rel="noreferrer" target="_blank">https://bugs.python.org/<wbr>issue32046</a>) and I agree with his idea since `callable` is not available in all 3.x versions.<br>
<br>
However, some people would like to clarify the policy of 2to3.<br>
That means that 2to3 is compatible with the branch that is currently maintained? or it is converted to specific Python 3.X codes with the specific version of 2to3?<br></blockquote><div><br></div><div>Ideally it would generate code that works under all *still supported* versions of Python, not just under the version that happens to be used to run the converter. In the context of that specific bug, callable() appeared in Python 3.2, but the oldest Python 3 version that's still supported is 3.4, so we're safe generating callable(). <br></div></div><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>