Arithmetic sequences in Python

Paul Rubin http
Mon Jan 16 17:00:58 EST 2006

Xavier Morel <xavier.morel at> writes:
> The only thing that bothers me about the initial proposal is that
> there would not, in fact, be any "range object", but merely a
> syntactic sugar for list/generator creation. 

Well, it could create something like an xrange.  Maybe that's preferable.

> Not that I really mind it, but, well, syntactic sugar for the
> purpose of syntactic sugar really doesn't bring much to the table.

I don't think this is a valid objection.  Python is already full of
syntactic sugar like indentation-based block structure, infix
operators, statements with keyword-dependent syntax, etc.  It's that
very sugar that attracts programmers to Python away from comparatively
sugarless languages like Scheme.  Indeed, Python is considered by many
to be a sweet language to program in, and they mean that in a nice

If you want, you can think of it as "flavor" rather than "sugar".  We
aren't after syntactic minimalism or we'd be using Scheme.  The
criterion for adding something like this to Python should be whether
makes the language taste better or not.

More information about the Python-list mailing list