Python compared to other language

Michael L Torrie torriem at chem.byu.edu
Mon May 21 11:22:01 EDT 2007


On Mon, 2007-05-21 at 16:00 +0200, Marc 'BlackJack' Rintsch wrote:
> In <1179753682.661307.186540 at y18g2000prd.googlegroups.com>,
> user2048 at yahoo.com wrote:
> 
> >> Python is a strongly typed but dynamic language ...
> > 
> > In the "A few questions" thread, John Nagle's summary of Python begins
> > "Python is a byte-code interpreted untyped procedural dynamic
> > language with implicit declaration. "
> > 
> > Is Python strongly typed or untyped?
> 
> Strongly typed.

Most people think of statically typed, like Java, when they think of
"Strongly typed."

Python is strongly, dynamically typed.  Some people refer to Python as
"duck typed" meaning that python cares more about what the object
appears to be, rather than it's actual type.  If it looks like a duck,
quacks like a duck, it must be a duck.  Thus python is more concerned
with the protocol of an object than the actual type.  This is a powerful
concept.  I've also found, though, that duck-typing can be a real
weakness when you're working with a complicated third-party library with
weak documentation.  You can't always infer what the method call is
expecting, even if you have the source code in front of you.  Figuring
out the python twisted I/O library, is fraught with such challenges,
despite the documentation.

> 
> Ciao,
> 	Marc 'BlackJack' Rintsch
> 




More information about the Python-list mailing list