Clarify the compatibility policy of lib2to3.
Hi, Few days ago, I submitted a patch(https://github.com/python/cpython/pull/4417) which updates2to3 converts `operator.isCallable(obj)` to `isinstance(obj, collections.abc.Callable)`. This was Serhiy Storchaka’s idea(https://bugs.python.org/issue32046) and I agree with his idea since `callable` is not available in all 3.x versions. However, some people would like to clarify the policy of 2to3. 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? Cordially, Dong-hee — Dong-hee Na Chungnam National University | Computer Science & Engineering Tel: +82 010-3353-9127 Email: donghee.na92@gmail.com Linkedin: https://www.linkedin.com/in/dong-hee-na-2b713b49/ Github: https://github.com/corona10
On Fri, Nov 17, 2017 at 8:56 AM, Dong-hee Na
Few days ago, I submitted a patch(https://github.com/ python/cpython/pull/4417) which updates2to3 converts `operator.isCallable(obj)` to `isinstance(obj, collections.abc.Callable)`.
This was Serhiy Storchaka’s idea(https://bugs.python.org/issue32046) and I agree with his idea since `callable` is not available in all 3.x versions.
However, some people would like to clarify the policy of 2to3. 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?
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(). -- --Guido van Rossum (python.org/~guido)
participants (2)
-
Dong-hee Na
-
Guido van Rossum