psss...I want to move from Perl to Python

Paul Rubin no.email at nospam.invalid
Thu Jan 28 21:06:39 EST 2016


Fillmore <fillmore_remove at hotmail.com> writes:
> I look and Python and it looks so much more clean....

Yes it is, I forgot everything I knew about Perl shortly after starting
to use Python.

> add to that that it is the language of choice of data miners...

There are a bunch of statistical libraries and that sort of thing but
you have to know what you're doing to use them.  It's not a matter of
the language itself, which is pretty simple.

> add to that that iNotebook looks powerful....

People seem to like it.  I don't use it myself (haven't felt the need).

> Does Python have Regexps?

Not built into the language the way Perl regexps are.  There's a regexp
library that's pretty capable, but you have to say things like
  re.search('foo.*bar', x)
instead of x ~ /foo.*bar/  or whatever.  Generally I'd say Perl has far
more built-in creature comforts where Python makes you call a library.
The capabilities end up being about the same but one could say Python
doesn't require you to remember as much stuff.

Perl 6 is another story, interesting but apparently monstrously
complicated.  I haven't looked at it closely but followed some of the
development history, which was amazing.

> How was the Python 2.7 vs Python 3.X solved? which version should I go for?

It hasn't really been solved and probably never will be.  It's probably
preferable to start with 3.x, but in practice the differences aren't
that large and you should be able to work with both.  Despite the
screams of this newsgroup, most professional projects that I've been
involved with are still using 2.x.

> Do you think that switching to Python from Perl is a good idea at 45?

Sure.

> Where do I get started moving from Perl to Python?

Read the tutorial ( https://docs.python.org/3/tutorial/ )
and hack some code.

> which gotchas need I be aware of?

There's lots of minor ones, just like with any other complicated system.
You'll run into them as you go along, and deal with them.  There's
nothing really horrible that I can think of.



More information about the Python-list mailing list