[Tutor] Python Book Recommendations [Was:[Re: Security]]
Alan Gauld
alan.gauld at btinternet.com
Thu Aug 16 11:53:03 CEST 2007
"Tim Michelsen" <timmichelsen at gmx-topmail.de> wrote
>> Have you seen this site yet?
>>
>> http://osl.iu.edu/~lums/swc/
A new one to me.
its not bad but does contain some downright misleading bits,
for example a quick scan of the functions topic yielded:
---------------
Python copies variables' values when passing them to functions
a.. Since Booleans, numbers, and strings can't be updated, a
function can't affect its caller's values
b.. But if you pass a list to a function, the function will operate
on the original list, not a copy
----------------
The first line is plain wrong. Python doesn't copy values it always
uses references,
its just that some objects are immutable while others are mutable.
This is a
common cause of confusion for beginners and this statement won't help.
And
the last line suggests that Python behaves inconsistently (which it
doesn't) but
doesn't clarify any of the "exceptions" other than lists - the same is
actually
true of any mutable type
So, as ever, use with care and check with the official docs if in
doubt.
But otherwise a fairly polished tutorial with a fairly specific
audience in mind.
Alan g.
More information about the Tutor
mailing list