optional int- and float arguments

Steve D'Aprano steve+python at pearwood.info
Tue Oct 3 18:18:30 EDT 2017


On Wed, 4 Oct 2017 03:18 am, Stefan Ram wrote:

>   »int« and »float« seem to behave quite similar:
> 
> |>>> int( x = 8 )
> |8
> |>>> float( x = 8.0 )
> |8.0


I expect that these functions taking a *named* parameter "x" is an accident that
shouldn't be relied on.


-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list