New submission from Christian Heimes: A while ago I created a backport of statistics to Python 2.6 to 3.3. [1] It worked pretty and required just a few modifications to the code. I'd like to add most modifications to 3.4 to simplify backporting.
The modifications are: * from __future__ import division * replace super() with super(MySuperClass, self) * changes to doc tests because Python 2 has slightly different represenstations (<type 'float'> / <class'float'>, longer float repr) * "import collections" -> "from collections import Counter" so I can simply add a Counter class for 2.6 * "import math" -> "from math import isfinite" so it's easier to add a isfinite() function for 2.x The patch does neither remove "raise ... from None" nor does it add a 2.x isfinite or range = xrange. The backport still needs some patches but I can keep the amount of changes rather small. [1] https://bitbucket.org/tiran/backports.statistics ---------- files: statistics_backports.patch keywords: patch messages: 204301 nosy: christian.heimes, larry priority: normal severity: normal stage: patch review status: open title: Make it easier to backport statistics to 2.7 type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32829/statistics_backports.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19763> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com