English version for Mémento Python 3 (draft, readers needed)
laurent.pointal at free.fr
Wed Jun 6 19:06:12 CEST 2012
Paul Rubin wrote:
> Laurent Pointal <laurent.pointal at free.fr> writes:
>>> There are a few other things like that, and I'll try to look more
>>> carefully tonight, I can't spend more time on it right now.
>> I updated the document into 1.0.5a (and fix some other errors).
> A few more things:
<zip: done (thanks)>
> In "Files"
> don't miss to close file => don't forget to close the file
> [but you might mention the "with" statement]
I put it as a note (I want students to have file closing in mind, they may
practice other languages without such constructions).
> In "Function definition"
> bloc => block
> (« black box ») => ("black box")
> [English speakers may not recognize « » symbols]
I switched them to "".
Its here to remember students that they can't access to functions internal
variables from outside (and should try to limit access to outside world from
inside functions) - a common error during practice. In lecture class, I try
to show them only two access points to functions: parameters and return
value, and a "black box" blocking all other informations.
> In "Generator of int sequences"
> You might mention that range makes a generator only in Python 3.
> In Python 2 it makes an actual list and xrange makes a generator.
We teach with Python3 as several modifications in the language are better
for leaning programming basics (like 1/2 => 0.5).
Thanks for all your corrections, I'll continue with other posters.
Laurent POINTAL - laurent.pointal at laposte.net
More information about the Python-list