Booleans, integer division, backwards compatibility; where is Python going?

Paul Boddie paul at boddie.net
Wed Apr 10 05:09:05 EDT 2002


Alex Martelli <aleax at aleax.it> wrote in message news:<0NCs8.63131$pT1.1810689 at news1.tin.it>...
> Paul Boddie wrote:
>         ...
> > sentiments.) However, I do feel that the more recent features seem
> > increasingly remote to the beginner and even the more
> 
> This can only come from a very selective view of "recent features".

Perhaps I've just been following the wrong threads on
comp.lang.python.

> Nothing is more natural to a beginner than "if x in somedict:" and
> "for x in thefile:" -- having had the opportunity to teach some
> beginners with 2.2, I've seen them slurp these up instantly (just
> try to contrast with "if somedict.has_key(x):" and
> "for x in thefile.xreadlines():" ...!).

Well, both examples you gave seemed to be controversial when up for
discussion in the past, but if you say they help people, then I'll
take your word for it.

> And the new features are the right way to implement such obvious progress --
> iterators, for example, let you loop on (e.g.) dictionaries or files, without
> requiring such types to define unnatural (or unfeasible) "indexing"
> then go out of their way to stop misuse.

Iterators are indeed nice to use and a very welcome feature.

> > advanced/experienced Python developer.
> 
> You MUST be joking -- inheriting from builtin types is SUCH a win,
> and so obviously so, for advanced and experienced developers!

Perhaps I'm not writing the kinds of applications where this is the
case, then.

> Generators need a "from __future__ import", so I applaud the tutorial's
> choice not to burden beginners with them YET.

It would be nice for some coverage of that particular feature, though.
I can't say that I've ever written one myself, although they do seem
useful for certain kinds of applications.

> > other things to do during working hours) it becomes increasingly hard
> > to keep track of what's great in the more recent Python releases.
> 
> I think AMK's "what's new" articles are great for that purpose.

I must find the time to review them at my leisure, then.

Paul



More information about the Python-list mailing list