[New-bugs-announce] [issue13384] Unnecessary __future__ import in random module

Robert Xiao report at bugs.python.org
Fri Nov 11 16:19:46 CET 2011

New submission from Robert Xiao <nneonneo at gmail.com>:

Lib/random.py in Python 3.2 contains the line

from __future__ import division

even though it is no longer necessary, as true float division is the default in Python 3.

Trivial patch:

--- lib/python3.2/random.py	2011-09-03 20:32:05.000000000 -0400
+++ lib/python3.2/random.py	2011-11-11 11:11:11.000000000 -0400
@@ -36,7 +36,6 @@
-from __future__ import division
 from warnings import warn as _warn
 from types import MethodType as _MethodType, BuiltinMethodType as _BuiltinMethodType
 from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil

components: Library (Lib)
messages: 147437
nosy: nneonneo
priority: normal
severity: normal
status: open
title: Unnecessary __future__ import in random module
versions: Python 3.2, Python 3.3, Python 3.4

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list