This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, benjamin.peterson, bmiller, loewis
Date 2008-04-11.15:24:08
SpamBayes Score 0.0077654696
Marked as misclassified No
Message-id <1207927449.99.0.638411437572.issue2610@psf.upfronthosting.co.za>
In-reply-to
Content
It looks like our messages have crossed in flight.

> this little patch allows them to print(range(100,0,-1))
> and get a much better intuition about what is happening.

This is a really bad example.  Why would you want to introduce the print 
function in the first class?  You can explain much of the language using 
python as an advanced calculator without introducing any IO.  
Furthermore, given that print changes from being a statement to being a 
function in 3.0, it will be a much less novice friendly construct for 
years to come.  Also range(100, 0, -1) is not the most shining example 
of python's clarity. :-)

I think the best idea for educators would be to limit introductory 
material to 2.x - 3.x portable constructs.  This means avoid using 
range(..) outside of looping constructs, don't use print before you have  
to (and then use a subset of 3.x syntax.)

BTW, you really only need to use print function when you start writing 
scripts and that is better avoided in the first class when you have 
interactive environment as you do with python.

As a side remark, you may find the following trick useful in the first 
class:

>>> range(10)
range(0, 10)
>>> list(_)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
History
Date User Action Args
2008-04-11 15:24:10belopolskysetspambayes_score: 0.00776547 -> 0.0077654696
recipients: + belopolsky, loewis, benjamin.peterson, bmiller
2008-04-11 15:24:10belopolskysetspambayes_score: 0.00776547 -> 0.00776547
messageid: <1207927449.99.0.638411437572.issue2610@psf.upfronthosting.co.za>
2008-04-11 15:24:09belopolskylinkissue2610 messages
2008-04-11 15:24:08belopolskycreate