"Laurent Claessens" <[email protected]> skrev i en meddelelse 
news:[email protected]...
> Hi all
>
>
> This is well known :
>
> >>> 1/2
> 0
>
> This is because the division is an "integer division".
>
> My question is : how can I evaluate 1/2 to 0.5 ? Is there some non integer 
> division operator ?
> Up to now I workarounded writing float(1)/2. Is there an other way ?

what about 1.0/2 ? 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to