Skip to content

Commit 396ef80

Browse files
committed
Some new 3.0 whatsnew items, written for GHOP by Andreas Freund.
1 parent 86173da commit 396ef80

File tree

1 file changed

+66
-5
lines changed

1 file changed

+66
-5
lines changed

Doc/whatsnew/3.0.rst

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,19 +182,31 @@ Strings and Bytes
182182
PEP 3101: A New Approach to String Formatting
183183
=============================================
184184

185-
XXX
185+
.. XXX expand this
186186
187+
* A new system for built-in string formatting operations replaces
188+
the ``%`` string formatting operator.
187189

188-
PEP 3106: Revamping ``.keys()``, ``.items()`` and ``.values()``
189-
===============================================================
190190

191-
XXX
191+
PEP 3106: Revamping dict ``.keys()``, ``.items()`` and ``.values()``
192+
====================================================================
193+
194+
.. XXX expand this
195+
196+
* The ``.iterkeys()``, ``.itervalues()`` and ``.iteritems()`` methods
197+
have been removed.
198+
199+
* ``.keys()``, ``.values()`` and ``.items()`` return objects with set
200+
behavior that reference the underlying dict.
192201

193202

194203
PEP 3107: Function Annotations
195204
==============================
196205

197-
XXX
206+
.. XXX expand this
207+
208+
* A standardized way of annotating a function's parameters and return
209+
values.
198210

199211

200212
Exception Stuff
@@ -216,6 +228,11 @@ Exception Stuff
216228
* PEP 3134: Exception chaining. (The ``__context__`` feature from the
217229
PEP hasn't been implemented yet in 3.0a1.)
218230

231+
* A few exception messages are improved when Windows fails to load an
232+
extension module. For example, ``error code 193`` is now ``%1 is not
233+
a valid Win32 application``. Strings now deal with non-English
234+
locales.
235+
219236

220237
New Class and Metaclass Stuff
221238
=============================
@@ -242,8 +259,13 @@ language and built-in functions.
242259

243260
* Removed ``<>`` (use ``!=`` instead).
244261

262+
* ``!=`` now returns the opposite of ``==``, unless ``==`` returns
263+
``NotImplemented``.
264+
245265
* ``as`` and ``with`` are keywords.
246266

267+
* ``True``, ``False``, and ``None`` are keywords.
268+
247269
* PEP 237: ``long`` renamed to ``int``. That is, there is only one
248270
built-in integral type, named ``int``; but it behaves like the old
249271
``long`` type, with the exception that the literal suffix ``L`` is
@@ -312,6 +334,23 @@ language and built-in functions.
312334

313335
* ``exec`` is now a function.
314336

337+
* There is a new free format floating point representation, which is
338+
based on "Floating-Point Printer Sample Code", by Robert G. Burger.
339+
``repr(11./5)`` now returns ``2.2`` instead of ``2.2000000000000002``.
340+
341+
* The ``__oct__()`` and ``__hex__()`` special methods are removed --
342+
``oct()`` and ``hex()`` use ``__index__()`` now to convert the
343+
argument to an integer.
344+
345+
* There is now a ``bin()`` builtin function.
346+
347+
* Support is removed for ``__members__`` and ``__methods__``.
348+
349+
* ``nb_nonzero`` is now ``nb_bool`` and ``__nonzero__`` is now
350+
``__bool__``.
351+
352+
* Removed ``sys.maxint``. Use ``sys.maxsize``.
353+
315354

316355
.. ======================================================================
317356
@@ -341,6 +380,18 @@ through the Subversion logs for all the details.
341380
* The ``cPickle`` module is gone. Use ``pickle`` instead. Eventually
342381
we'll have a transparent accelerator module.
343382

383+
* The ``imageop`` module is gone.
384+
385+
* The ``audiodev``, ``Bastion``, ``bsddb185``, ``exceptions``,
386+
``linuxaudiodev``, ``md5``, ``MimeWriter``, ``mimify``, ``popen2``,
387+
``rexec``, ``sets``, ``sha``, ``stringold``, ``strop``, ``sunaudiodev``,
388+
``timing``, and ``xmllib`` modules are gone.
389+
390+
* The ``new`` module is gone.
391+
392+
* The methods ``os.tmpnam()``, ``os.tempnam()`` and ``os.tmpfile()`` have
393+
been removed in favor of the ``tempfile`` module.
394+
344395
.. ======================================================================
345396
.. whole new modules get described in subsections here
346397
@@ -358,6 +409,15 @@ Changes to Python's build process and to the C API include:
358409

359410
* PEP 3123: Making ``PyObject_HEAD`` conform to standard C.
360411

412+
* No more C API support for restricted execution.
413+
414+
* ``PyNumber_Coerce()``, ``PyNumber_CoerceEx()``, ``PyMember_Get``,
415+
and ``PyMember_Set`` C APIs are removed.
416+
417+
* New C API ``PyImport_ImportModuleNoBlock()``, works like
418+
``PyImport_ImportModule()`` but won't block on the import lock (returning
419+
an error instead).
420+
361421
.. ======================================================================
362422
363423
@@ -366,6 +426,7 @@ Port-Specific Changes
366426

367427
Platform-specific changes go here.
368428

429+
369430
.. ======================================================================
370431
371432

0 commit comments

Comments
 (0)