[OT] New to Python: Features

Alex Martelli aleaxit at yahoo.com
Tue Oct 5 14:44:48 CEST 2004


Mark English <Mark.English at liffe.com> wrote:
   ...
> > 1. Multi line comments
> No. There are no comments in Python.

No comment.


> > 3. Function nesting with proper lexical scope (i.e. closures) 
> The penguins do nest, yes.

But with a lexical scope that's often shockingly improper.


> 16. The ability to call a function without 
> > brackets
> You're kidding, right. Right ? Without brackets ? That's... that's just
> not possible is it ?

In fact, it works better if you use parentheses, except when the
function you're calling is the __getitem__ method of an object.


> 17. Is the Python interpreter a JIT? Does it have a 
> > bytecode?  Is it as 
> > fast as Java?
> Python is generally 2000 to 3000 times faster than Java if you run Java
> on a toaster and Python on a super-cooled space computer orbiting
> Saturn.

Roughly correct, though the exact number depends on the model of
toaster.  But in the next release of Python, we're going to extend the
validity of this observation to computers orbiting Neptune (assuming
NASA does approve the grant being we're lobbyi^H^H^H^H humbly requesting
of them).


Alex



More information about the Python-list mailing list