darcs patch: Initial port to Python 3.0 (and 2 more)
Clemens Fruhwirth
clemens at endorphin.org
Tue Dec 7 10:11:43 CET 2010
You are right, Simon. Many of these changes were quick and dirty and should
be refined. The patch was intended to be tested by Igloo on older Python
versions.
The decision we are facing is to deprecate Python 2.5 or not (was released
2006). If not, we need to reinvent exception handling in a 2.5-3.0
compatible way. To give a hint what I have in mind here: write lamdba based
exception handlers -- just like our Haskell catch for both 2.x and 3.x and
do a selective import based on sys.hexversion. I did something similar for
print in my private repo already. However, this could drive down readibility
even more.
---
Fruhwirth, Clemens. (Sent from mobile device)
Am 07.12.2010 10:02 schrieb "Simon Marlow" <marlowsd at gmail.com>:
On 02/12/10 09:31, Clemens Fruhwirth wrote:
>
> More Python 3.0 fixes (resending also the previous p...
I don't know much about Python 3.0... but I suppose we should support it.
Most of these changes look harmless, but some make the code less readable
(iterators instead of filter? yeuch). This doesn't look quite right:
> +def lineFormat(line):
> + return " " + line
> +
> def summary(t, file):
>
> file.write('\n')
> hunk ./driver/testlib.py 1551
> file.write('OVERALL SUMMARY for test run started at ' \
> + t.start_time + '\n'\
> - + string.rjust(`t.total_tests`, 8) \
> + + lineFormat(repr(t.total_tests)) \
There are quite a few whitespcae changes in there too.
Can I suggest breaking this up a bit: leave out the whitespace changes, and
maybe put all the print() changes in one patch.
Cheers,
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/cvs-ghc/attachments/20101207/68228a70/attachment.htm>
More information about the Cvs-ghc
mailing list