[Tutor] iterators
Alan Gauld
alan.gauld at btinternet.com
Sun Jan 19 17:55:52 CET 2014
On 19/01/14 16:18, Oscar Benjamin wrote:
> It's not really that complicated. Basically range on 3.x (or xrange on
> 2.x) returns a range object:
Sadly though it is complicated, at least for newbies :-(
Python 3 has cleaned up much of the language from a Comp Sci point of
view but from the point of view of a lay newbie it has exposed lots of
complicated detritus that means absolutely nothing to them.
What is an iterator? a range object? generators? slots?
Lists and sequences are fairly standard language concepts but these new
terms are terrifyingly obscure for newbies, especially when they appear
in error messages.
It has reached the point that I'm back to looking for a new teaching
language. In Python 3 the decision has clearly been made to focus on
supporting Python's role as a professional software engineering language
at the expense of being a successor to ABC or for use in CP4E etc.
That's a fair enough decision but it does mean Python is no longer the
easiest option for non Comp Sci beginners. It's not worse than the
others but it's no longer clearly superior. (IMHO at least! )
But what else is there? that's the problem.... :-(
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list