469,573 Members | 1,039 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,573 developers. It's quick & easy.

Getting into Python, comming from Perl.

Hi, list.

I'm into a psicological doubt that I would like to share with you
(you'll know why later on this mail).

I'm a programmer with 5 year of experience into Perl. I'm on that point
where you resolve problems without thinking on HOW you'll do it with
that language but only on the problem itself.

Since Perl 6 started I've been following it. The conclusion I have is
they're making a whole new language and I'll have to learn it. This
being said and, since I've to learn a new language, I've started
thinking in a new language. I've noticed Python is getting more and more
developers and many projects are being made.

I've tryed to use python some times but I get frustrated very quick. I
get myself many times needing to figure out how to loop through a list,
declare an associative array, checking how to pass named parameters to
functions, and simple things like that.

What I would like to know is if anyone had these problems and if you can
share that experience with me. I'm trying to minimize my "frustration" :)

Thanks a lot.

--
Miguel Manso <mm****@amplitudenet.pt>
============================================
Amplitude Net
Net - Rua dos Salazares, 842
4100-442 Porto

Phone: +351 22 532 2000
Fax: +351 22 618 2157
Web: www.amplitudenet.pt
============================================

Jul 19 '05 #1
7 1537
Miguel Manso <mm****@amplitudenet.pt> writes:
I've tryed to use python some times but I get frustrated very quick. I
get myself many times needing to figure out how to loop through a
list, declare an associative array, checking how to pass named
parameters to functions, and simple things like that.
I went through some of those frustrations.
What I would like to know is if anyone had these problems and if you
can share that experience with me. I'm trying to minimize my
"frustration" :)


The thing is, the answers to all your questions are in the
documentation. You just need to know the Python names for things, and
not the Perl names. For instance, Python calls it's associative array
structure a dictionary, and a checking the documentation index for
dictionary turns up a link to the syntax for declaring one as
display/dictionary.

Read through the tutorial. Then look through some "interesting"
modules in the standard library to see how these things fit together.

<mike
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Jul 19 '05 #2
Miguel Manso wrote:
What I would like to know is if anyone had these problems and if you can
share that experience with me. I'm trying to minimize my "frustration" :)


Read the Python tutorial, front to back, 2 times. Next, read Dive into
Python (free e-book) front to back, 2 times, make notes the second time.

Then start programming :-D (It's what I am doing)

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
Jul 19 '05 #3
Miguel Manso wrote:
Mike Meyer wrote:
Miguel Manso <mm****@amplitudenet.pt> writes:
I've tryed to use python some times but I get frustrated very quick. I
get myself many times needing to figure out how to loop through a
list, declare an associative array, checking how to pass named
parameters to functions, and simple things like that.


I went through some of those frustrations.
What I would like to know is if anyone had these problems and if you
can share that experience with me. I'm trying to minimize my
"frustration" :)


The thing is, the answers to all your questions are in the
documentation. You just need to know the Python names for things, and
not the Perl names. For instance, Python calls it's associative array
structure a dictionary, and a checking the documentation index for
dictionary turns up a link to the syntax for declaring one as
display/dictionary.

Read through the tutorial. Then look through some "interesting"
modules in the standard library to see how these things fit together.

<mike


I guess I'll just do that. I'll put the frustration in a bag, grab the
documentation and try to figure it out.

Thanks all.

And, when the frustration returns, ask questions on c.l.py or the tutor
list. By and large we don;t bite here, and the tutor list is
particularly newbie-friendly, though with your Perl experience *that*
may not be as appropriate.

regards
Steve
--
Steve Holden +1 703 861 4237 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/

Jul 19 '05 #4
Miguel Manso <mm****@amplitudenet.pt> wrote:
I'm a programmer with 5 year of experience into Perl. I'm on that point
where you resolve problems without thinking on HOW you'll do it with
that language but only on the problem itself.

Since Perl 6 started I've been following it. The conclusion I have is
they're making a whole new language and I'll have to learn it.
I have had a similar experience. Actually it was Perl 6, and and
particular this chart

http://www.ozonehouse.com/mark/blog/...odicTable.html

that made me think that Perl was leaving the rails, and it was time to
jump ship (to mix my metaphors).

That was over a year ago now, and me and my colleagues haven't looked
back. Yes there was a small amount of retraining, but conceptually
Perl and Python aren't that far apart, its mostly a matter of syntax.

The philosophies of the two languages are quite different though.
Perl's TIMTOWTDI is diametrically opposed to Python's "There should be
one - and preferably only one - obvious way to do it" and I think that
is a major advantage when building bigger programs. Type "import
this" at the Python interactive prompt to see more about Python's
philosophy, and note that it seems like a direct reaction to Perl's
baroque-ness.

One thing I've definitely noticed is that Python had made me a better
OO programmer. Its so clunky making objects in Perl that I almost
never did except when making a library. In Python its so easy that I
don't have to think about it.
This being said and, since I've to learn a new language, I've
started thinking in a new language. I've noticed Python is getting
more and more developers and many projects are being made.

I've tryed to use python some times but I get frustrated very quick. I
get myself many times needing to figure out how to loop through a list,
declare an associative array, checking how to pass named parameters to
functions, and simple things like that.

What I would like to know is if anyone had these problems and if you can
share that experience with me. I'm trying to minimize my
"frustration" :)


I like to read books to retrain myself. That may not be your way, but
if it is I'd recommend "Dive into Python" by Mark Pilgrim as a good
first step. Its available for free in electronic form too. After
that you could read Programming Python.

Good luck!
--
Nick Craig-Wood <ni**@craig-wood.com> -- http://www.craig-wood.com/nick
Jul 19 '05 #5
Miguel Manso wrote:
I've tryed to use python some times but I get frustrated very quick. I
get myself many times needing to figure out how to loop through a list,
declare an associative array, checking how to pass named parameters to
functions, and simple things like that.


Create a cheat sheet with all those stock phrases that you know by heart
in Perl, but have to look up in Python. That way, it's only one look.
And you'll know them by heart soon enough.

You could also print out or keep bookmarks on the modules you use the
most. When I started using Python, I did this for strings, regular
expressions and the os and os.path modules.

Daniel
Jul 19 '05 #6
Nick Craig-Wood <ni**@craig-wood.com> wrote:

I have had a similar experience. Actually it was Perl 6, and and
particular this chart

http://www.ozonehouse.com/mark/blog/...odicTable.html

that made me think that Perl was leaving the rails, and it was time to
jump ship (to mix my metaphors).


That is truly wonderous. Are you famliar with the phrase "jumping the
shark"? This chart might prove that, with Perl 6, Perl has now "jumped the
shark".
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jul 19 '05 #7
Tim Roberts wrote:
That is truly wonderous. Are you famliar with the phrase "jumping the
shark"? This chart might prove that, with Perl 6, Perl has now "jumped the
shark".


For those of us who maybe don't spend enough time
watching TV: http://www.wordspy.com/words/jumptheshark.asp

-Peter
Jul 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

54 posts views Thread by Brandon J. Van Every | last post: by
42 posts views Thread by Fred Ma | last post: by
31 posts views Thread by surfunbear | last post: by
68 posts views Thread by Lad | last post: by
30 posts views Thread by Stuart Turner | last post: by
13 posts views Thread by squash | last post: by
12 posts views Thread by rurpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.