473,394 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 1668
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
42
by: Fred Ma | last post by:
Hello, This is not a troll posting, and I've refrained from asking because I've seen similar threads get all nitter-nattery. But I really want to make a decision on how best to invest my time....
31
by: surfunbear | last post by:
I've read some posts on Perl versus Python and studied a bit of my Python book. I'm a software engineer, familiar with C++ objected oriented development, but have been using Perl because it is...
68
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
30
by: Stuart Turner | last post by:
Hi Everyone, I'm working hard trying to get Python 'accepted' in the organisation I work for. I'm making some good in-roads. One chap sent me the text below on his views of Python. I wondered...
13
by: squash | last post by:
I am a little annoyed at why such a simple program in Perl is causing so much difficulty for python, i.e: $a += 200000 * 140000; print $a;
12
by: rurpy | last post by:
Is there an effcient way (more so than cgi) of using Python with Microsoft IIS? Something equivalent to Perl-ISAPI?
2
by: vj | last post by:
I have a perl script which connect to network stream using sockets. The scripts first logins in to the server and then parses the data comming from the socket. Statement 1: my $today =...
8
by: Palindrom | last post by:
Hi everyone ! I'd like to apologize in advance for my bad english, it's not my mother tongue... My girlfriend (who is a newbie in Python, but knows Perl quite well) asked me this morning why...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.