[Python Wpg] Newbie question
Bill Reid
billreid at shaw.ca
Fri Feb 24 22:17:17 EST 2006
Mike Pfaiffer wrote:
> On February 24, 2006 03:59 pm, Dave Gabrielson wrote this amazing epistle:
>> This one can take some digging if you don't know about it.
>> I've been bit before, so I know about it:
>>
>> import copy
>>
>> a = copy.deepcopy(b)
>
> Thanks. I didn't see anything appropriate in the language reference or
> tutorial. I suspect it's one of those things I missed. I'll try it out in a
> couple of hours (supper is almost ready).
>
> It looks like one of those OOP things. Correct?
>
I would not call it an OO thing. It is just that many languages do not copy
arrays by value since there is a big potential performance hit.
What I have found working with Perl, Python, Ruby, PHP, Tcl, VBasic... it is not
the language semantics and syntax that takes the longest to master. You of
course have to get your head around the "way" of programming in a specific language.
The real rub is the function libraries. For being productive the power is in the
libraries. It is a pleasure if a new language has at least keep the same names
for similar functions as older languages. For example Ruby sticks pretty close
to Perl names. Since the names are somewhat arbitrary I find it difficult to
keep track of which function goes with which language. Now is it index or instr,
etc.
That aside, Perl is a bit different since it embeds a lot of "functions" in syntax.
-- Bill
--
More information about the Winnipeg
mailing list