Re: [Python-ideas] add a single __future__ for py3?
On Sep 22, 2015, at 6:43 PM, Andrew Barnert
It's just about these four imports, right?
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals
I think the case is overblown.
- absolute_import is rarely an issue; the only thing it does (despite the name) is give an error message when you attempt a relative import without using a "." in the import. A linter can find this easily for you, and a little discipline plus the right example can do a lot of good here.
- division is important.
- print_function is important.
- unicode_literals is useless IMO. It breaks some things (yes there are still APIs that don't take unicode in 2.7) and it doesn't nearly as much as what would be useful -- e.g. repr() and <stream>.readline() still return 8-bit strings. I recommend just using u-literals and abandoning Python 3.2.
-- --Guido van Rossum (python.org/~guido) _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
participants (1)
-
Chris Barker - NOAA Federal