[Tutor] More type() puzzlement
rdm at rcblue.com
Sun Oct 28 11:49:07 CET 2007
At 01:53 AM 10/28/2007, you wrote:
>"Dick Moores" <rdm at rcblue.com> wrote
> > So you're saying that it's to be expected that the analogy, "int is
> > to long as int is to float" will hold. But why should it be expected
> > to hold? float and long are completely different animals, no?
>No, they are all types of numbers.
>The general rule is that Python (and most other languages)
>will convert a simpler type to a more "powerful" type but never
>the other way around - you may need to keep the power...
Ah, got it. Finally.
Thanks very much, Alan.
More information about the Tutor