[Tutor] Python 3 - bugs or installation problem

Alan Gauld alan.gauld at btinternet.com
Thu Mar 5 09:10:30 CET 2015


On 05/03/15 01:53, Phil wrote:
> I hope this is not another embarrassingly obvious answer to a simple
> question.
>
> Python 3, under Kubuntu.
>
> xrange() fails whereas range() is accepted. Could this be an
> installation problem?

There are many incompatible changes in Python v3 compared with v2.
Some are obvious like the removal of xrange and raw_input and a few 
others. Some are slightly more subtle like the change of print from a 
statement to a function. Still others are simply name changes to improve 
consistency of naming.

The standard library has had a major makeover too and many
modules have been reorganised and renamed.

If you are moving to v3 you need to keep the documentation
handy for the first few weeks to quickly check errors to
see if its a bug or a feature!

The good news is that once you get used to ut most of the
changes are for the better.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list