A few questions

John Nagle nagle at animats.com
Mon May 21 02:16:24 EDT 2007


jay wrote:
> Hi,
> 
> I'm totally new to Python and was hoping someone might be able to  
> answer a few questions for me:
> 
> 1.  What are your views about Python vs Perl?  Do you see one as  better 
> than the other?

     Python is a much cleaner language than Perl, but not as widely used.
The Python language is in good shape; the libraries vary in quality.

> 2.  Is there a good book to start with while learning Python?  I'm  
> currently reading 'Python Essential Reference' by David M. Beazley.   So 
> far it looks like a pretty good book, but would like more  tutorials to 
> work with (I've also been reading through the tutorials  at 'python.org' 
> which has some excellent stuff!).

     They're all reasonably good.  Python doesn't have Perl's "There's
more than one way to do it" problem, so all Python books describe
the same language.   (Perl books tend to describe the subsections of
the language that particular author likes.  It takes about three
different Perl books to cover every language feature.)  "Learning
Python" has more tutorials, but the online tutorials at "python.org"
should be sufficient.  This just isn't a very difficult language.

     If you have a computer science background, here's all you need
to know: Python is a byte-code interpreted untyped procedural dynamic
language with implicit declaration.  Syntax is vaguely C-like.  Block
structure is determined by indentation.  Objects use a class definition/
explicit instantiation/multiple inheritance model.  Memory management
is safe and managed by reference counts backed by a garbage collector.
Weak references are supported.  Built in data types are numerics, ASCII
and Unicode strings, dynamic arrays, fixed size tuples, and hashes.
Implementation speed is typically 2% of C.  That's Python.
> 
> 3.  Currently, I write most of my code with Xcode (on the Mac  platform) 
> using Applescript. 

     Can't speak to Mac issues.  Tkinter will work, although it may be
aesthetically displeasing to Mac users.

					John Nagle



More information about the Python-list mailing list