Static Typing in Python

Premshree Pillai premshree_python at yahoo.co.in
Mon Mar 15 21:23:48 EST 2004


 --- Jacek Generowicz <jacek.generowicz at cern.ch>
wrote: > Ludovic Aubry <no_ludal_spam at logilab.com>
writes:
> 
> > On Mon, 15 Mar 2004 14:41:10 +0100, Jacek
> Generowicz wrote:
> > 
> > > Python is strongly typed because:
> > > 
> > > - lots of type checking is done
> > > - few implicit type conversions are done.
> > > - No operations which are inappropriate to the
> object(s) in question
> > >   are allowed.
> > While I agree with the above...
> > 
> > I think your arguments in the following are mostly
> wrong:
> 
> I did say (somewhere) that strong and weak typing is
> a pretty
> wish-washy concept ... and I'm not going to engage
> in discussions of
> just how weakly typed C is and why. I agree, there
> are plenty of ways
> in which you could pick holes in my examples. I'm
> sorry, I don't find
> pursuing this train of thought very interesting.
> 
> > > Try as you will, Python would not allow you to
> do any of these things,
> > > because it is _strongly typed_ with respect to
> these operations on these
> > > types.
> > Python will allow you to multiply string with
> integers for example ;)
> 
> Yes, and in that respect it is weakly typed. 
> 
> ML, for example wouldn't even allow you to add a
> float to an integer,
> without explicit instructions stating what it is
> that you mean, which
> Python would do for you without hesitation, so in
> that respect Python
> is more weakly typed than ML.
> 
> PERL would allow you to add "3" to 3, Python would
> not. In that
> respect Python is more strongly typed than PERL.
> 
> (I neither know nor care whether the answer PERL
> gives you is 6 or 33 :-)
> -- 
> http://mail.python.org/mailman/listinfo/python-list 

Hmm...Python is strongly typed; weaker than ML, but
stronger than Perl. :-)

=====
-Premshree
[http://www.qiksearch.com/]

________________________________________________________________________
Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more. 
Go to: http://in.insurance.yahoo.com/licspecial/index.html




More information about the Python-list mailing list