[sage-devel] Re: Adding __future__ imports in all .py(x) files

2016-04-21 Thread Volker Braun
+1 As others mentioned, there are at least 3 similar cases where future imports should be used: * The sage library (this thread) * The preparser * Doctest runner I'm in favor of either. A preparser change should probably coincide with a major version change. On Thursday, April 21, 2016 at

Re: [sage-devel] Re: Adding __future__ imports in all .py(x) files

2016-04-21 Thread Jeroen Demeyer
On 2016-04-21 11:04, Simon King wrote: I suppose it would be enough if SageMath would do the "from __future__" imports at startup. In that way, the doc tests would automatically have to comply with Python 3, isn't it? No, future imports work on a file-by-file basis. Also, the parsing of

[sage-devel] Re: Adding __future__ imports in all .py(x) files

2016-04-21 Thread Simon King
Hi Daniel, On 2016-04-21, Daniel Krenn wrote: > What about doctests? Manually add these import there everywhere? Or is > there a "better way"? I suppose it would be enough if SageMath would do the "from __future__" imports at startup. In that way, the doc tests would automatically