question about input() and/or raw_input()
Ethan Furman
ethan at stoneleaf.us
Sun Jan 19 12:50:08 EST 2014
On 01/19/2014 08:38 AM, Chris Angelico wrote:
> On Mon, Jan 20, 2014 at 3:14 AM, Ethan Furman <ethan at stoneleaf.us> wrote:
>>>> --> def quux1(x): return str(x+1)
>>> --> quux1(2.3)
>>> '3.3'
>>
>> (Will be) fixed in 3.5 [1] :)
>> [1] Which is to say, both will raise an exception.
>
> Why would that raise?
Sorry, should have read that closer. It will not raise.
The difference I was thinking of is:
"%h" % 3.14 # this works
vs.
hex(3.14) # this raises
In 3.5 both will raise.
Apologies for the noise.
--
~Ethan~
More information about the Python-list
mailing list