Lines Matching +full:- +full:uall
9 .. $Id: whatsnew23.tex 54631 2007-03-31 11:58:36Z georg.brandl $
18 improved the performance of new-style classes. A few new built-in functions
24 data types, the ability to import modules from ZIP-format archives, metadata
25 support for the long-awaited Python catalog, an updated version of IDLE, and
27 command-line options, using BerkeleyDB databases... the list of new and
68 ``&`` and ``|``. Mutable sets also have in-place versions of these methods,
90 in-place version with the ungainly name :meth:`symmetric_difference_update`. ::
116 :pep:`218` - Adding a Built-In Set Object Type
123 .. _section-generators:
203 more interesting examples. The simplest one implements an in-order traversal of
206 # A recursive generator that generates Tree leaves in in-order.
216 the N-Queens problem (placing $N$ queens on an $NxN$ chess board so that no
247 :pep:`255` - Simple Generators
254 .. _section-encodings:
261 the first or second line of the source file. For example, a UTF-8 file can be
265 # -*- coding: UTF-8 -*-
267 Without such an encoding declaration, the default encoding used is 7-bit ASCII.
268 Executing or importing modules that contain string literals with 8-bit
281 :pep:`263` - Defining Python Source Code Encodings
282 Written by Marc-André Lemburg and Martin von Löwis; implemented by Suzuki Hisao
292 ZIP-format archive. You don't need to import the module explicitly; it will be
296 .. code-block:: shell-session
298 amk@nyman:~/src/python$ unzip -l /tmp/example.zip
301 -------- ---- ---- ----
302 8467 11-26-02 22:30 jwzthreading.py
303 -------- -------
328 :pep:`273` - Import Modules from Zip Archives
332 :ref:`section-pep302` for a description of the new import hooks.
346 :func:`open` built-in function. If a Unicode string is passed to
364 :pep:`277` - Unicode file name support for Windows NT
379 cross-platform work is that these three platforms all use different characters to
382 two-character sequence of a carriage return plus a newline.
394 line-endings.
397 :option:`!--without-universal-newlines` switch when running Python's
403 :pep:`278` - Universal Newline Support
409 .. _section-enumerate:
414 A new built-in function, :func:`enumerate`, will make certain loops a bit
435 :pep:`279` - The enumerate() built-in function
450 or even e-mail them to a particular address; of course, it's also possible to
473 logging.critical('Critical error -- shutting down')
479 CRITICAL:root:Critical error -- shutting down
530 class. All of these classes can be replaced by your own specially-written
541 :pep:`282` - A Logging System
547 .. _section-bool:
554 :const:`False` constants were added to the built-ins in Python 2.2.1, but the
570 Most of the standard library modules and built-in functions have been changed to
587 Python's Booleans were *not* added for the sake of strict type-checking. A very
613 :pep:`285` - Adding a bool type
645 :pep:`293` - Codec Error Handling Callbacks
651 .. _section-pep301:
656 Support for the long-requested Python catalog makes its first appearance in 2.3.
666 `Trove <http://catb.org/~esr/trove/>`_-style strings can be supplied to help
689 register --list-classifiers``.
694 :pep:`301` - Package Index and Metadata for Distutils
700 .. _section-pep302:
726 objects to it. Additional built-in and frozen modules can be imported by an
735 Pseudo-code for Python's new import logic, therefore, looks something like this
760 :pep:`302` - New Import Hooks
766 .. _section-pep305:
768 PEP 305: Comma-separated Files
771 Comma-separated files are a format frequently used for exporting data from
772 databases and spreadsheets. Python 2.3 adds a parser for comma-separated files.
774 Comma-separated format is deceptively simple at first glance::
795 can the quoting and line-ending characters.
797 Different dialects of comma-separated files can be defined and registered;
799 :class:`csv.writer` class will generate comma-separated files from a succession
805 :pep:`305` - CSV File API
812 .. _section-pep307:
818 2.3 development cycle. In 2.2, new-style classes could be pickled without
820 example where a new-style class results in a pickled string three times longer
824 function has supported a text-or-binary flag for a long time. In 2.3, this
825 flag is redefined from a Boolean to an integer: 0 is the old text-mode pickle
826 format, 1 is the old binary format, and now 2 is a new 2.3-specific format. A
836 To reduce the pickling overhead for new-style classes, a new interface for
849 :pep:`307` - Extensions to the pickle protocol
855 .. _section-slices:
862 ``L[1:10:2]``, ``L[:-1:1]``, ``L[::-1]``. This was added to Python at the
864 extensively. However, Python's built-in list, tuple, and string sequence types
877 >>> L[::-1]
885 >>> s[::-1]
909 >>> a[::2] = [0, -1]
911 [0, 1, -1, 3]
929 built-in sequences::
942 :func:`range`. :meth:`indices` handles omitted and out-of-bounds indices in a
957 From this example you can also see that the built-in :class:`slice` object is
971 section :ref:`section-generators` of this document.
973 * A new built-in function :func:`enumerate` was added, as described in section
974 :ref:`section-enumerate` of this document.
977 built-in :class:`bool` type, as described in section :ref:`section-bool` of this
981 raising an :exc:`OverflowError` when a string or floating-point number is too
986 * Built-in types now support the extended slicing syntax, as described in
987 section :ref:`section-slices` of this document.
989 * A new built-in function, ``sum(iterable, start=0)``, adds up the numeric
996 with slice indexing, so when *pos* is -1 the value will be inserted before the
1041 Python with the :option:`-O` switch will still generate code that doesn't
1055 <module 'abc' (built-in)>
1062 supply :option:`-Walways::PendingDeprecationWarning:: <-W>` on the command line or
1065 * The process of deprecating string-based exceptions, as in ``raise "Error
1076 File objects also have a new read-only :attr:`encoding` attribute that gives the
1080 * The method resolution order used by new-style classes has changed, though
1088 read the thread on python-dev starting with the message at
1089 https://mail.python.org/pipermail/python-dev/2002-October/029035.html. Samuele
1095 100 bytecodes, speeding up single-threaded applications by reducing the
1101 * One minor but far-reaching change is that the names of extension types defined
1115 * One of the noted incompatibilities between old- and new-style classes has been
1117 attributes of new-style classes. There are some restrictions on what can be
1125 --------------
1176 * A new type object, :class:`basestring`, has been added. Both 8-bit strings and
1181 * Interned strings are no longer immortal and will now be garbage-collected in
1189 -------------
1191 * The creation of new-style class instances has been made much faster; they're
1199 the O(n\*n) required for the grade-school multiplication algorithm. (Original
1204 :ref:`section-other` for a longer explanation. (Removed by Michael Hudson.)
1250 bz2-compressed data is usually smaller than corresponding :mod:`zlib`\
1251 -compressed data. (Contributed by Gustavo Niemeyer.)
1285 GNU-style scanning mode. The existing :func:`getopt` stops processing options as
1286 soon as a non-option argument is encountered, but in GNU-style mode processing
1289 >>> getopt.getopt(['-f', 'filename', 'output', '-v'], 'f:v')
1290 ([('-f', 'filename')], ['output', '-v'])
1291 >>> getopt.gnu_getopt(['-f', 'filename', 'output', '-v'], 'f:v')
1292 ([('-f', 'filename'), ('-v', '')], ['output'])
1307 algorithm. A heap is an array-like data structure that keeps items in a
1387 instead of trying to enable it on a per-use basis.
1389 * The :mod:`optparse` module contains a new parser for command-line arguments
1394 * The old and never-documented :mod:`linuxaudiodev` module has been deprecated,
1398 (Contributed by Greg Ward and Nicholas FitzRoy-Dale.)
1403 even the Linux distribution version. (Contributed by Marc-André Lemburg.)
1443 attempts to import them will fail with a :exc:`RuntimeError`. New-style classes
1482 :program:`tar`\ -format archive files. (Contributed by Lars Gustäbel.)
1509 arguments for fine-tuning the formatting; consult the module's documentation
1513 :mod:`dummy_thread` and :mod:`dummy_threading`, that provide a do-nothing
1515 threads are not supported. The intention is to simplify thread-aware modules
1542 convert an 8-bit string to Unicode by appending an empty Unicode string to it or
1561 * The :mod:`Tkinter` module now works with a thread-enabled version of Tcl.
1569 https://mail.python.org/pipermail/python-dev/2002-December/031107.html for a more
1598 Adding the mix-in as a superclass provides the full dictionary interface
1645 * The :mod:`xmlrpclib` module now supports an XML-RPC extension for handling nil
1647 unmarshalling an XML-RPC response. To generate requests containing ``None``,
1651 * The new :mod:`DocXMLRPCServer` module allows writing self-documenting XML-RPC
1653 Web browser to the RPC server produces pydoc-style documentation; pointing
1659 domain name and the ASCII-compatible encoding (ACE) of that name. ::
1662 'www.xn--alliancefranaise-npb.nu'
1669 Unicode URLs with non-ASCII host names as long as the ``path`` part of the URL
1679 --------------
1704 '2002-12-30T21:27:03.994956'
1734 -------------------
1736 The :mod:`getopt` module provides simple parsing of command-line arguments. The
1738 command-line parsing that follows the Unix conventions, automatically creates
1739 the output for :option:`!--help`, and can perform different actions for different
1749 op.add_option('-i', '--input',
1752 op.add_option('-l', '--length',
1768 .. code-block:: shell-session
1770 $ ./python opt.py -i data arg1
1773 $ ./python opt.py --input=data --length=4
1780 .. code-block:: shell-session
1782 $ ./python opt.py --help
1786 -h, --help show this help message and exit
1787 -iINPUT, --input=INPUT
1789 -lLENGTH, --length=LENGTH
1802 .. _section-pymalloc:
1815 :option:`!--with-pymalloc` option to the :program:`configure` script. In 2.3,
1817 to supply :option:`!--without-pymalloc` to disable it.
1833 be fixed; doubtless there are more third-party modules that will have the same
1856 :option:`!--with-pydebug`.
1882 without it, and the :option:`!--with-cycle-gc` switch to :program:`configure` has
1886 (:file:`libpython2.3.so`) by supplying :option:`!--enable-shared` when running
1894 * The interpreter can be compiled without any docstrings for the built-in
1895 functions and modules by supplying :option:`!--without-doc-strings` to the
1897 but will also mean that you can't get help for Python's built-ins. (Contributed
1903 and the argument checking can then be removed. If compatibility with pre-2.2
1937 Port-Specific Changes
1938 ---------------------
1942 system APIs. The Python port for EMX tries to support all the POSIX-like
1946 gained support for case-sensitive import semantics as part of the integration of
1963 .. _section-other:
1977 if Python had been invoked with the :option:`-i` option. The environment
1982 except *foo*." A resource name passed to the :option:`!-u` option can now be
1983 prefixed with a hyphen (``'-'``) to mean "remove this resource." For example,
1984 the option '``-uall,-bsddb``' could be used to enable the use of all resources
1994 "python -O". For Python 2.3 Michael Hudson implemented a similar scheme to
1999 from a slight speed up when Python is run without :option:`-O`.
2002 instead call ``PyCode_Addr2Line(f->f_code, f->f_lasti)``. This will have the
2003 added effect of making the code work as desired under "python -O" in earlier
2027 raising an :exc:`OverflowError` when a string or floating-point number is too
2030 * If you have Unicode strings that contain 8-bit characters, you must declare
2031 the file's encoding (UTF-8, Latin-1, or whatever) by adding a comment to the top
2032 of the file. See section :ref:`section-encodings` for more information.
2040 :exc:`FutureWarning`. Currently they're stored as 32-bit numbers and result in a
2044 just add an ``L`` to the end of the literal. If you're trying to get a 32-bit