[Tutor] Beginner's question

Terrence Brannon metaperl at gmail.com
Mon Aug 7 21:02:45 CEST 2006


On 8/7/06, Mahesh <mahesh.akarapu at gmail.com> wrote:
>
> Hi All,


Hi Mahesh

To start with, please forgive me if this question is already answered.
> I am totally new to Python. I heard about Python some 3 years back,
> but did not give importance to it.


Similar to my story. I have been a 100% Perl professional for 6 years
and did not pay much attention to other
agile languages during that time.

I am hearing a lot about Python
> again recently.


Amen, me too! It all started when all the mailing lists starting preferring
mailman over majordomo... even Perl ones!

I was wondering what Python is good for and how will
> it help me, since I am already comfortable with C.


Well, I just got serious as a heart attack about Python because I really
needed to go beyond building websites page by page and nothing in Perl was
up to the task. So I started with Drupal and Joomla, both PHP products, but
really found Plone to be a more scaleable product and Python to be a more
sane language than PHP.

Could someone tell me how Python is useful and why is it a good
> language to learn apart from C.


Python is good for:
- clean code: just look at the syntactic requirements
- high quality flexible object oriented programming - I really like
the approach to controlling objects with things
like __init__ - and if you look at the plone videos, you see how
default public accessors can have policies added
to them by writing the accessor method. He also goes over why he opted
on a Python CMS over PHP
and even Ruby.
- Rapid web app development - Quixote, Django, Turbo Gears, CherryPy and
even Plone
- Content mgmt - Plone
- Large scale development - the import mechanism is very clean and concise
compared to Perl's ExtUtils::MakeMaker. The regularity of code is ensured
regardless of chosen editor.
- The C++ crowd loves to script their code with Python.
- google uses Python heavily
- TwistedMatrix is a powerful generic server appliance
- the community does not have nearly as much elitism as I found in the Perl
world.

The only difficult thing about Python is that the community discussions and
source repositories are highly, highly distributed. In Perl, you have CPAN
and Perlmonks.org and maybe a few mailing lists. It was very easy to keep on
top of all new Perl developments on a daily basis. With Python, people all
keep their source at their repo. Or you have to go through a lot of places
like Codezoo, Sourceforge, and others.

But Perl has basically run out of steam. Perl 5 was a great language for
mixing C and Shell concepts. But Perl has lost control of the webapp space,
and for object-oriented programming, the approach is far more manual,
especially in the area of creating getters and setters (the leading product
for this in Perl is Class::Accessor - just look at how difficult it is to
use). Perl 6 is a cryptic imitation of Python and Ruby that will not appeal
to Perl 5 fans or anyone seeking a simple easy to use language. And industry
will be squeamish over a completely new codebase and a language that looks
and has semantics quite different from Perl 5.

Also please point me to a good
> starting point for learning Python.


I started with "Think Like a Computer Scientist" but it has typos and
the author never got back to me when
I emailed him about them. I think in retrospect, just reading the
Tutorial and Library Reference at
python.org
is all you need. Then some articles like "Functional Programming in Python"
http://www.amk.ca/python/writing/functional
are good from there.

And be sure to read comp.lang.python every day - lots of good Q/A there. And
I though ASPN Python Cookbook was a good resource, but the programs are
quite buggy based on IRC #python discussions.


Thanks
> Mahesh
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060807/43907b27/attachment.htm 


More information about the Tutor mailing list