• Home
  • Raw
  • Download

Lines Matching +full:python +full:- +full:format

2   What's New In Python 3.1
37 sufficient; the e-mail address isn't necessary.
49 This article explains the new features in Python 3.1, compared to 3.0.
50 Python 3.1 was released on June 27, 2009.
56 Regular Python dictionaries iterate over key/value pairs in arbitrary order.
73 the underlying tuple indices. The :mod:`json` module is being built-out with
75 Support was also added for third-party tools like `PyYAML <https://pyyaml.org/>`_.
79 :pep:`372` - Ordered Dictionaries
84 PEP 378: Format Specifier for Thousands Separator
87 The built-in :func:`format` function and the :meth:`str.format` method use
88 a mini-language that now includes a simple, non-locale aware way to format
92 >>> format(1234567, ',d')
94 >>> format(1234567.89, ',.2f')
96 >>> format(12345.6 + 8901234.12j, ',f')
98 >>> format(Decimal('1234567.89'), ',f')
105 like dots, spaces, apostrophes, or underscores. Locale-aware applications
106 should use the existing *n* format specifier which already has some support
111 :pep:`378` - Format Specifier for Thousands Separator
119 Some smaller changes made to the core Python language are:
135 >>> n = 2**123-1
144 * The fields in :func:`format` strings can now be automatically
147 >>> 'Sir {} of {}'.format('Gallahad', 'Camelot')
181 >>> round(1123, -2)
186 * Python now uses David Gay's algorithm for finding the shortest floating
199 What is new is how the number gets displayed. Formerly, Python used a
200 simple approach. The value of ``repr(1.1)`` was computed as ``format(1.1,
202 using 17 digits was that it relied on IEEE-754 guarantees to assure that
203 ``eval(repr(1.1))`` would round-trip exactly to its original value. The
206 problem with Python itself).
220 assure cross-platform portability by using the old algorithm.
310 library code that does. Setting-up a null handler will suppress
318 * The :mod:`runpy` module which supports the ``-m`` command line switch
385 Python 2.x when used with protocol 2 or lower. The reorganization of the
387 example, ``__builtin__.set`` in Python 2 is called ``builtins.set`` in Python
389 Python. But now when protocol 2 or lower is selected, the pickler will
390 automatically use the old Python 2 names for both loading and dumping. This
391 remapping is turned-on by default but can be disabled with the *fix_imports*
400 An unfortunate but unavoidable side-effect of this change is that protocol 2
401 pickles produced by Python 3.1 won't be readable with Python 3.0. The latest
403 Python 3.x implementations, as it doesn't attempt to remain compatible with
404 Python 2.x.
409 pure Python reference implementation of the :keyword:`import` statement and its
422 Python and quickly proved to be a problematic bottleneck in Python 3.0.
423 In Python 3.1, the I/O library has been entirely rewritten in C and is
424 2 to 20 times faster depending on the task at hand. The pure Python
432 collections and therefore the garbage collection overhead on long-running
437 * Enabling a configure option named ``--with-computed-gotos``
446 * The decoding of UTF-8, UTF-16 and LATIN-1 is now two to four times
468 * IDLE's format menu now provides an option to strip trailing whitespace
476 Changes to Python's build process and to the C API include:
481 significant performance improvements on 64-bit machines, but
482 benchmark results on 32-bit machines have been mixed. Therefore,
483 the default is to use base ``2**30`` on 64-bit machines and base ``2**15``
484 on 32-bit machines; on Unix, there's a new configure option
485 ``--enable-big-digits`` that can be used to override this default.
490 internal format, giving the number of bits per digit and the size in bytes
521 Porting to Python 3.1
551 make Python 3.1 pickles unreadable in Python 3.0. One solution is to use