[issue16609] float loses precision when passed to str()

2012-12-07 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16609] float loses precision when passed to str()

2012-12-04 Thread Cal Leeming

Changes by Cal Leeming :


--
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16609] float loses precision when passed to str()

2012-12-04 Thread Cal Leeming

Cal Leeming added the comment:

Actually, you do have a good point, this should have been using 
random.getrandbits really.

--
status: pending -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16609] float loses precision when passed to str()

2012-12-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I agree with Mark here. This isn't specific to random.random() and it's already 
covered elsewhere in the documentation.

Furthermore, I don't know why you're using str() on random.random(). There are 
better ways to get random strings, such as random.getrandbits() or os.urandom().

Recommend closing.

--
nosy: +pitrou
resolution:  -> invalid
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16609] float loses precision when passed to str()

2012-12-04 Thread R. David Murray

R. David Murray added the comment:

That's why I suggested a glossary entry.  The relevant function description 
*does* contain the phrase "floating point", so a glossary link there would be 
reasonably natural.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16609] float loses precision when passed to str()

2012-12-04 Thread Mark Dickinson

Changes by Mark Dickinson :


--
title: random.random() / float() loses precision when passed to str() -> float 
loses precision when passed to str()

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com