more fun with PEP 276

Delaney, Timothy tdelaney at avaya.com
Wed Dec 12 21:29:23 EST 2001


> From: philh at comuno.freeserve.co.uk 
>
> Another possibility would be to make .. part of the syntax 
> for lists, i.e.:
> 
> a = [ -5 .. 5, 10, 20 ]
> 
> a is [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 10, 20]
>
> Maybe instead we should be looking at implementing a clever 
> macro system
> as a preprocessor to Python. Something that could cope with 
> ...to...step...
> would have to be quite complex, but a macro system that used 
> function-call
> like syntax would be simpler.

And we come full circle ... again ...

Tim Delaney




More information about the Python-list mailing list