Differences between revisions 3 and 4
Revision 3 as of 2004-08-17 17:32:49
Size: 1283
Comment: Add link to other 3.0 page
Revision 4 as of 2004-08-19 03:05:01
Size: 1434
Editor: cpe-68-112-255-10
Comment: Added comment about with statement
Deletions are marked like this. Additions are marked like this.
Line 25: Line 25:
== Other Ideas from the BDFL ==

 * "I want to reserve the leading dot for attribute assignment to a special object specified by a 'with' statement."
Line 45: Line 49:

This page lists features that GvR has mentioned as goals for Python 3.0.

(Another list is at PythonThreeDotOh, but it incorporates items that GvR has never talked about.)

  • Reduce feature duplication:
    • string module vs. string methods
    • xrange() vs range()
    • int vs. long
    • 8 bit vs. Unicode strings
    • map/filter/reduce vs. list comprehensions
    • lambda vs. def
  • Library reorganization
  • Return iterators instead of lists
    • d.keys(), .values(), .items()
    • range(), zip(), map(), filter()
  • Consume iterators
    • min(), max()
  • Optional static typing?
  • Support only new-style classes; classic classes will be gone.
  • Remove string exceptions, x for repr(x), sys.exc_type, coerce(), other deprecated stuff

  • print as a function -- write(x,y,z), writeln(x,y,z)

See the "Python Regrets" talk and other recent presentations by Guido.

Other Ideas from the BDFL

  • "I want to reserve the leading dot for attribute assignment to a special object specified by a 'with' statement."

Rearrangements

intern(), id(): put in sys

xrange(): make range() return an iterator

buffer(): must die (use bytes, PEP 296)

raw_input(): use sys.stdin.readline()

input(): use eval(sys.stdin.readline())

callable(): just call it, already

execfile(), reload(): use exec()

compile(): put in sys

exec as a statement is not worth it -- make it a function

Python3.0 (last edited 2011-04-08 16:42:51 by ip-109-90-196-137)

Unable to edit the page? See the FrontPage for instructions.