[Python-bugs-list] [ python-Bugs-780315 ] DeprecationWarning in random.py

SourceForge.net noreply@sourceforge.net
Wed, 30 Jul 2003 14:36:28 -0700


Bugs item #780315, was opened at 2003-07-30 09:11
Message generated for change (Comment added) made by bcannon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=780315&group_id=5470

Category: None
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: kyo (ky0)
Assigned to: Nobody/Anonymous (nobody)
>Summary: DeprecationWarning in random.py

Initial Comment:
c:\python23\lib\random.py:52: DeprecationWarning: 
classic float division
  NV_MAGICCONST = 4 * _exp(-0.5)/_sqrt(2.0)

----------------------------------------------------------------------

>Comment By: Brett Cannon (bcannon)
Date: 2003-07-30 14:36

Message:
Logged In: YES 
user_id=357491

The only way to reproduce this is to be running the interpreter 
with the -Qwarnall option; ``./python.exe -Qwarnall -c "import 
random"`` will reproduce it.  But if you run ``./python.exe -Qnew 
-c "import random" `` everything is fine.

All of this has to do with true division that will become the default 
in Python 3.  -Qwarnall warns about *all* division, even when the 
mathematical outcome of the division is the same regardless of 
whether ``from __future__ import division`` (which can also be 
done on the command-line by passing the -Qnew option) was run 
or not.

In other words there is nothing to worry about here.  I am closing 
this as "won't fix".

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=780315&group_id=5470