Is there no end to Python?

Georg Brandl g.brandl-nospam at gmx.net
Sat Mar 18 10:41:21 EST 2006


dan wrote:
> Steve wrote:
> 
> """No need for flames. I'll content myself with pointing out that most
> 1.5.2 programs will run unchanged in 2.5, so the backwards
> compatibility
> picture is very good. Nobody makes you use the new features!""
> 
> Nobody makes you use new features, true...unless you are relying on a
> library or module that uses them...;-)

Even then, you are unlikely to have to use them in your own code.

E.g. decorators: you can stick with

def xxx():
    pass
xxx = decorator(xxx)

Or genexps: you can still write a listcomp.

On the third hand, there haven't been too many new features in the language.
Let's see through whatsnew24:

PEP218 builtin sets: already there as a library in 2.3
PEP237 unifying long/int: not visible to programmers
PEP289 generator expressions: new feature
PEP292 string substitutions: not widely used, you can ignore it
PEP318 decorators: see above
PEP322 reverse iteration: one new builtin, not too much I hope
PEP324 subprocess module: you don't have to used, stick with popen*
PEP327 decimal data type: if you don't need it, you won't use it,
                          if you need it, you'll have used a library
PEP328 multi-line imports: a matter of parentheses
PEP331 locale-independent float/string conversions: never heard of it myself ;)

Summa summarum, exactly one new syntax, one new builtin and one new stdlib
module to care about.

Georg



More information about the Python-list mailing list