[issue35126] Mistake in FAQ about converting number to string.

2019-02-19 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue35126] Mistake in FAQ about converting number to string.

2019-02-19 Thread miss-islington

miss-islington  added the comment:


New changeset c611db4942a07c81f54e6584615bbddc51034a77 by Miss Islington (bot) 
(Stéphane Wirtel) in branch '2.7':
[2.7] bpo-35126: Fix a mistake in FAQ about converting number to string 
(GH-11911)
https://github.com/python/cpython/commit/c611db4942a07c81f54e6584615bbddc51034a77


--
nosy: +miss-islington

___
Python tracker 

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



[issue35126] Mistake in FAQ about converting number to string.

2019-02-19 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
keywords: +easy

___
Python tracker 

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



[issue35126] Mistake in FAQ about converting number to string.

2019-02-18 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi @xtreak,

I have just submitted a PR but where I explain the change with Python2/3 and 
the division operator.

Have a nice day,

--

___
Python tracker 

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



[issue35126] Mistake in FAQ about converting number to string.

2019-02-18 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
keywords: +patch
pull_requests: +11937
stage:  -> patch review

___
Python tracker 

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



[issue35126] Mistake in FAQ about converting number to string.

2019-02-18 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

I am working on this issue.

--
nosy: +matrixise

___
Python tracker 

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



[issue35126] Mistake in FAQ about converting number to string.

2019-02-17 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This is a good first issue. Python 3 docs uses `{:.3f}".format(1.0/3.0)` that 
was changed as part of 04d8a245f162b33e6c861ba0869918d9262be63e. Python 2 docs 
could be changed too to use floats that makes the example correct.

--
nosy: +Mariatta, cheryl.sabella

___
Python tracker 

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



[issue35126] Mistake in FAQ about converting number to string.

2018-11-01 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue35126] Mistake in FAQ about converting number to string.

2018-10-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Yep, this is incorrect in Python 2 unless `from __future__ import division` is 
imported at the beginning. Would you want to make a PR against the 2.7 branch 
to correct this?

--
nosy: +pablogsal

___
Python tracker 

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



[issue35126] Mistake in FAQ about converting number to string.

2018-10-31 Thread Pawel


New submission from Pawel :

In this question:
https://docs.python.org/2.7/faq/programming.html#how-do-i-convert-a-number-to-a-string

There is a statement:
"{:.3f}".format(1/3) yields '0.333'

While

In [2]: "{:.3f}".format(1/3)
Out[2]: '0.000'

In [3]: "{:.3f}".format(1/3.0)
Out[3]: '0.333'

--
assignee: docs@python
components: Documentation
messages: 329000
nosy: docs@python, grottrumsel
priority: normal
severity: normal
status: open
title: Mistake in FAQ about converting number to string.
versions: Python 2.7

___
Python tracker 

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