Implicit Conversions
Serge Orlov
sombDELETE at pobox.ru
Sun Dec 14 16:42:26 EST 2003
More information about the Python-list mailing list
Sun Dec 14 16:42:26 EST 2003
- Previous message (by thread): Idle won't start
- Next message (by thread): Implicit Conversions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Mel Wilson" <mwilson at the-wire.com> wrote in message news:Ex02/ks/KzJT089yn at the-wire.com... > In article <mailman.112.1071251837.9307.python-list at python.org>, > "=?iso-8859-1?B?UmVuZek=?=" <rlogan at hmc.edu> wrote: > >I wanted to know the order of implicit conversions and which sort of = > >values > >allow them. From searching around in books and the archive of this = > >mailing > >list, it seems to be that only numbers are implicitly converted within = > >each > >other and bools can be implicitly converted to ints? However, I'm unable = > >to > >find any other implicit conversions and the order of the implicit > >conversions (something like int->float->long). Any help would be greatly > >apprectiated. Also, I'm not on the mailing list so can everyone please = > >cc me > >in the replies? > > Anybody? > > Speaking as a Python programmer (not a Python developer), > I would say that Python doesn't generally do implicit > conversions. To be more specific Python Virtual Machine doesn't do implicit conversions. However any class including builtin ones can convert any input argument to any other type. From the outer point of view (e.g. user of int class) it's implicit conversion, but from inner point of view (e.g. int class) there is no implicit conversions of input arguments so the int class has to explicitly convert them. -- Serge.
- Previous message (by thread): Idle won't start
- Next message (by thread): Implicit Conversions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list