On 5/8/05, PhiHo Hoang <[EMAIL PROTECTED]> wrote:
> Jim Hugunin wrote:
>
> > PhiHo Hoang wrote:
> > > Why 66.6 cannot be converted to System.Int32 ?
> > 66.6 can be both explicitly converted to an int and compared to one.
>
> >>>> int(66.6)
> >66
> >>>> 12 < 66.6
> >True
> >
Jim Hugunin wrote:
PhiHo Hoang wrote:
> Why 66.6 cannot be converted to System.Int32 ?
66.6 can be both explicitly converted to an int and compared to one.
>>> int(66.6)
66
>>> 12 < 66.6
True
>>> 66.6 < 12
False
It's a good thing that 66.6 won't be implicitly converted to an
PhiHo Hoang wrote:
> Why 66.6 cannot be converted to System.Int32 ?
66.6 can be both explicitly converted to an int and compared to one.
>>> int(66.6)
66
>>> 12 < 66.6
True
>>> 66.6 < 12
False
It's a good thing that 66.6 won't be implicitly converted to an int
since that would lose precision.