@roundup.psfhosted.org
on behalf of Tim Peters
Sent: Monday, June 22, 2020 5:59 PM
To: rskir...@hotmail.com
Subject: [issue41071] from an int to a float , why
Tim Peters added the comment:
Mike, read that exchange again. You originally wrote
"print(2 / 2) gives 2.0 instead of 2"
but you didn
Tim Peters added the comment:
Mike, read that exchange again. You originally wrote
"print(2 / 2) gives 2.0 instead of 2"
but you didn't _mean_ that. You meant to say it "gives 1.0 instead of 1", or
you meant something other than "2 / 2"). In Python 3,
>>> print(2 / 2)
1.0
Which is what Se
, 2020 5:20 PM
To: rskir...@hotmail.com
Subject: [issue41071] from an int to a float , why
Tim Peters added the comment:
Read the PEP Serhiy already linked to:
https://www.python.org/dev/peps/pep-0238/
This was a deliberate change to how "integer / integer" works, introduced with
ython@roundup.psfhosted.org
on behalf of Tim Peters
Sent: Monday, June 22, 2020 5:20 PM
To: rskir...@hotmail.com
Subject: [issue41071] from an int to a float , why
Tim Peters added the comment:
Read the PEP Serhiy already linked to:
https://www.python.org/dev/peps/pep-0238/
This was a deliberate c
Tim Peters added the comment:
Read the PEP Serhiy already linked to:
https://www.python.org/dev/peps/pep-0238/
This was a deliberate change to how "integer / integer" works, introduced with
Python 3.
--
nosy: +tim.peters
status: open -> closed
__
mike stern added the comment:
Not satisfied with that reply
you can't just decide to close the ticket without even giving a reasonable
answer, or even try that on 2.7 or 3.7 to see if it is true what I said.
Besides, that is not a convincing answer, that is actually no answer at all!!!
I mad
Steven D'Aprano added the comment:
Mike, the bug tracker is not a help-desk for questions. There are many other
forums where you can ask for help:
- the python-list and tutor mailing lists
https://www.python.org/community/lists/
- Stackoverflow
- The Python IRC channel https://www.python
Serhiy Storchaka added the comment:
I cannot reproduce. 2 / 2 gives 1.0 to me.
As for reasons for changing the division operator, read PEP 238.
--
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Pyth
New submission from mike stern :
please I would like to know why python changes an integer result in a division
to a float even in the result is even
like print(2 / 2) gives 2.0 instead of 2
or
a = 2 / 2
print(a)
--
components: Interpreter Core
messages: 372033
nosy: rskir...@hotma