Differences between revisions 4 and 5
Revision 4 as of 2004-08-19 03:05:01
Size: 1434
Editor: cpe-68-112-255-10
Comment: Added comment about with statement
Revision 5 as of 2004-08-19 03:07:43
Size: 1499
Editor: cpe-68-112-255-10
Comment: Forgot to include example.
Deletions are marked like this. Additions are marked like this.
Line 27: Line 27:
 * "I want to reserve the leading dot for attribute assignment to a special object specified by a 'with' statement."  * I want to reserve the leading dot for attribute assignment to a special object specified by a 'with' statement, e.g. {{{
with self:
    .foo = [1, 2, 3]
    .bar(4, .foo)
}}}

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, e.g.

    with self:
        .foo = [1, 2, 3]
        .bar(4, .foo)

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.