@@ -182,19 +182,31 @@ Strings and Bytes
182
182
PEP 3101: A New Approach to String Formatting
183
183
=============================================
184
184
185
- XXX
185
+ .. XXX expand this
186
186
187
+ * A new system for built-in string formatting operations replaces
188
+ the ``% `` string formatting operator.
187
189
188
- PEP 3106: Revamping ``.keys() ``, ``.items() `` and ``.values() ``
189
- ===============================================================
190
190
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.
192
201
193
202
194
203
PEP 3107: Function Annotations
195
204
==============================
196
205
197
- XXX
206
+ .. XXX expand this
207
+
208
+ * A standardized way of annotating a function's parameters and return
209
+ values.
198
210
199
211
200
212
Exception Stuff
@@ -216,6 +228,11 @@ Exception Stuff
216
228
* PEP 3134: Exception chaining. (The ``__context__ `` feature from the
217
229
PEP hasn't been implemented yet in 3.0a1.)
218
230
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
+
219
236
220
237
New Class and Metaclass Stuff
221
238
=============================
@@ -242,8 +259,13 @@ language and built-in functions.
242
259
243
260
* Removed ``<> `` (use ``!= `` instead).
244
261
262
+ * ``!= `` now returns the opposite of ``== ``, unless ``== `` returns
263
+ ``NotImplemented ``.
264
+
245
265
* ``as `` and ``with `` are keywords.
246
266
267
+ * ``True ``, ``False ``, and ``None `` are keywords.
268
+
247
269
* PEP 237: ``long `` renamed to ``int ``. That is, there is only one
248
270
built-in integral type, named ``int ``; but it behaves like the old
249
271
``long `` type, with the exception that the literal suffix ``L `` is
@@ -312,6 +334,23 @@ language and built-in functions.
312
334
313
335
* ``exec `` is now a function.
314
336
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
+
315
354
316
355
.. ======================================================================
317
356
@@ -341,6 +380,18 @@ through the Subversion logs for all the details.
341
380
* The ``cPickle `` module is gone. Use ``pickle `` instead. Eventually
342
381
we'll have a transparent accelerator module.
343
382
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
+
344
395
.. ======================================================================
345
396
.. whole new modules get described in subsections here
346
397
@@ -358,6 +409,15 @@ Changes to Python's build process and to the C API include:
358
409
359
410
* PEP 3123: Making ``PyObject_HEAD `` conform to standard C.
360
411
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
+
361
421
.. ======================================================================
362
422
363
423
@@ -366,6 +426,7 @@ Port-Specific Changes
366
426
367
427
Platform-specific changes go here.
368
428
429
+
369
430
.. ======================================================================
370
431
371
432
0 commit comments