pytho****@googl*****
pytho****@googl*****
2011年 2月 20日 (日) 18:50:44 JST
2 new revisions: Revision: 0820eff980 Author: Naoki INADA <inada****@klab*****> Date: Sun Feb 20 00:55:00 2011 Log: library/diff と library/orig を追加. http://code.google.com/p/python-doc-ja/source/detail?r=0820eff980 Revision: 8407432b3d Author: Naoki INADA <inada****@klab*****> Date: Sun Feb 20 01:48:09 2011 Log: merge http://code.google.com/p/python-doc-ja/source/detail?r=8407432b3d ============================================================================== Revision: 0820eff980 Author: Naoki INADA <inada****@klab*****> Date: Sun Feb 20 00:55:00 2011 Log: library/diff と library/orig を追加. http://code.google.com/p/python-doc-ja/source/detail?r=0820eff980 Added: /library/diff/2to3.rst.diff /library/diff/2to3.rst.html /library/diff/__builtin__.rst.diff /library/diff/__builtin__.rst.html /library/diff/__future__.rst.diff /library/diff/__future__.rst.html /library/diff/_winreg.rst.diff /library/diff/_winreg.rst.html /library/diff/aepack.rst.diff /library/diff/aepack.rst.html /library/diff/aetools.rst.diff /library/diff/aetools.rst.html /library/diff/aetypes.rst.diff /library/diff/aetypes.rst.html /library/diff/aifc.rst.diff /library/diff/aifc.rst.html /library/diff/anydbm.rst.diff /library/diff/anydbm.rst.html /library/diff/array.rst.diff /library/diff/array.rst.html /library/diff/ast.rst.diff /library/diff/ast.rst.html /library/diff/asynchat.rst.diff /library/diff/asynchat.rst.html /library/diff/asyncore.rst.diff /library/diff/asyncore.rst.html /library/diff/audioop.rst.diff /library/diff/audioop.rst.html /library/diff/autogil.rst.diff /library/diff/autogil.rst.html /library/diff/bastion.rst.diff /library/diff/bastion.rst.html /library/diff/bdb.rst.diff /library/diff/bdb.rst.html /library/diff/binhex.rst.diff /library/diff/binhex.rst.html /library/diff/bisect.rst.diff /library/diff/bisect.rst.html /library/diff/bz2.rst.diff /library/diff/bz2.rst.html /library/diff/calendar.rst.diff /library/diff/calendar.rst.html /library/diff/carbon.rst.diff /library/diff/carbon.rst.html /library/diff/cd.rst.diff /library/diff/cd.rst.html /library/diff/cgi.rst.diff /library/diff/cgi.rst.html /library/diff/cmath.rst.diff /library/diff/cmath.rst.html /library/diff/cmd.rst.diff /library/diff/cmd.rst.html /library/diff/codecs.rst.diff /library/diff/codecs.rst.html /library/diff/codeop.rst.diff /library/diff/codeop.rst.html /library/diff/collections.rst.diff /library/diff/collections.rst.html /library/diff/colorpicker.rst.diff /library/diff/colorpicker.rst.html /library/diff/commands.rst.diff /library/diff/commands.rst.html /library/diff/compiler.rst.diff /library/diff/compiler.rst.html /library/diff/configparser.rst.diff /library/diff/configparser.rst.html /library/diff/constants.rst.diff /library/diff/constants.rst.html /library/diff/contextlib.rst.diff /library/diff/contextlib.rst.html /library/diff/cookielib.rst.diff /library/diff/cookielib.rst.html /library/diff/copy.rst.diff /library/diff/copy.rst.html /library/diff/crypt.rst.diff /library/diff/crypt.rst.html /library/diff/csv.rst.diff /library/diff/csv.rst.html /library/diff/ctypes.rst.diff /library/diff/ctypes.rst.html /library/diff/curses.panel.rst.diff /library/diff/curses.panel.rst.html /library/diff/curses.rst.diff /library/diff/curses.rst.html /library/diff/datetime.rst.diff /library/diff/datetime.rst.html /library/diff/dbhash.rst.diff /library/diff/dbhash.rst.html /library/diff/decimal.rst.diff /library/diff/decimal.rst.html /library/diff/difflib.rst.diff /library/diff/difflib.rst.html /library/diff/dis.rst.diff /library/diff/dis.rst.html /library/diff/dl.rst.diff /library/diff/dl.rst.html /library/diff/doctest.rst.diff /library/diff/doctest.rst.html /library/diff/easydialogs.rst.diff /library/diff/easydialogs.rst.html /library/diff/email-examples.rst.diff /library/diff/email-examples.rst.html /library/diff/email.charset.rst.diff /library/diff/email.charset.rst.html /library/diff/email.encoders.rst.diff /library/diff/email.encoders.rst.html /library/diff/email.errors.rst.diff /library/diff/email.errors.rst.html /library/diff/email.generator.rst.diff /library/diff/email.generator.rst.html /library/diff/email.header.rst.diff /library/diff/email.header.rst.html /library/diff/email.message.rst.diff /library/diff/email.message.rst.html /library/diff/email.mime.rst.diff /library/diff/email.mime.rst.html /library/diff/email.parser.rst.diff /library/diff/email.parser.rst.html /library/diff/email.util.rst.diff /library/diff/email.util.rst.html /library/diff/exceptions.rst.diff /library/diff/exceptions.rst.html /library/diff/fcntl.rst.diff /library/diff/fcntl.rst.html /library/diff/fileinput.rst.diff /library/diff/fileinput.rst.html /library/diff/fnmatch.rst.diff /library/diff/fnmatch.rst.html /library/diff/framework.rst.diff /library/diff/framework.rst.html /library/diff/ftplib.rst.diff /library/diff/ftplib.rst.html /library/diff/functions.rst.diff /library/diff/functions.rst.html /library/diff/future_builtins.rst.diff /library/diff/future_builtins.rst.html /library/diff/gc.rst.diff /library/diff/gc.rst.html /library/diff/getopt.rst.diff /library/diff/getopt.rst.html /library/diff/gettext.rst.diff /library/diff/gettext.rst.html /library/diff/gl.rst.diff /library/diff/gl.rst.html /library/diff/gzip.rst.diff /library/diff/gzip.rst.html /library/diff/hashlib.rst.diff /library/diff/hashlib.rst.html /library/diff/heapq.rst.diff /library/diff/heapq.rst.html /library/diff/hmac.rst.diff /library/diff/hmac.rst.html /library/diff/hotshot.rst.diff /library/diff/hotshot.rst.html /library/diff/htmlparser.rst.diff /library/diff/htmlparser.rst.html /library/diff/httplib.rst.diff /library/diff/httplib.rst.html /library/diff/ic.rst.diff /library/diff/ic.rst.html /library/diff/imp.rst.diff /library/diff/imp.rst.html /library/diff/imputil.rst.diff /library/diff/imputil.rst.html /library/diff/index.rst.diff /library/diff/index.rst.html /library/diff/inspect.rst.diff /library/diff/inspect.rst.html /library/diff/intro.rst.diff /library/diff/intro.rst.html /library/diff/io.rst.diff /library/diff/io.rst.html /library/diff/itertools.rst.diff /library/diff/itertools.rst.html /library/diff/json.rst.diff /library/diff/json.rst.html /library/diff/language.rst.diff /library/diff/language.rst.html /library/diff/locale.rst.diff /library/diff/locale.rst.html /library/diff/logging.rst.diff /library/diff/logging.rst.html /library/diff/mac.rst.diff /library/diff/mac.rst.html /library/diff/macos.rst.diff /library/diff/macos.rst.html /library/diff/macostools.rst.diff /library/diff/macostools.rst.html /library/diff/mailbox.rst.diff /library/diff/mailbox.rst.html /library/diff/markup.rst.diff /library/diff/markup.rst.html /library/diff/marshal.rst.diff /library/diff/marshal.rst.html /library/diff/math.rst.diff /library/diff/math.rst.html /library/diff/mmap.rst.diff /library/diff/mmap.rst.html /library/diff/msilib.rst.diff /library/diff/msilib.rst.html /library/diff/msvcrt.rst.diff /library/diff/msvcrt.rst.html /library/diff/multifile.rst.diff /library/diff/multifile.rst.html /library/diff/multiprocessing.rst.diff /library/diff/multiprocessing.rst.html /library/diff/mutex.rst.diff /library/diff/mutex.rst.html /library/diff/numbers.rst.diff /library/diff/numbers.rst.html /library/diff/operator.rst.diff /library/diff/operator.rst.html /library/diff/optparse.rst.diff /library/diff/optparse.rst.html /library/diff/os.path.rst.diff /library/diff/os.path.rst.html /library/diff/os.rst.diff /library/diff/os.rst.html /library/diff/ossaudiodev.rst.diff /library/diff/ossaudiodev.rst.html /library/diff/othergui.rst.diff /library/diff/othergui.rst.html /library/diff/pdb.rst.diff /library/diff/pdb.rst.html /library/diff/pickle.rst.diff /library/diff/pickle.rst.html /library/diff/pickletools.rst.diff /library/diff/pickletools.rst.html /library/diff/pkgutil.rst.diff /library/diff/pkgutil.rst.html /library/diff/platform.rst.diff /library/diff/platform.rst.html /library/diff/plistlib.rst.diff /library/diff/plistlib.rst.html /library/diff/posixfile.rst.diff /library/diff/posixfile.rst.html /library/diff/pprint.rst.diff /library/diff/pprint.rst.html /library/diff/profile.rst.diff /library/diff/profile.rst.html /library/diff/pty.rst.diff /library/diff/pty.rst.html /library/diff/pyclbr.rst.diff /library/diff/pyclbr.rst.html /library/diff/python.rst.diff /library/diff/python.rst.html /library/diff/queue.rst.diff /library/diff/queue.rst.html /library/diff/random.rst.diff /library/diff/random.rst.html /library/diff/re.rst.diff /library/diff/re.rst.html /library/diff/readline.rst.diff /library/diff/readline.rst.html /library/diff/repr.rst.diff /library/diff/repr.rst.html /library/diff/rexec.rst.diff /library/diff/rexec.rst.html /library/diff/rlcompleter.rst.diff /library/diff/rlcompleter.rst.html /library/diff/runpy.rst.diff /library/diff/runpy.rst.html /library/diff/sched.rst.diff /library/diff/sched.rst.html /library/diff/select.rst.diff /library/diff/select.rst.html /library/diff/sets.rst.diff /library/diff/sets.rst.html /library/diff/shelve.rst.diff /library/diff/shelve.rst.html /library/diff/shutil.rst.diff /library/diff/shutil.rst.html /library/diff/signal.rst.diff /library/diff/signal.rst.html /library/diff/simplehttpserver.rst.diff /library/diff/simplehttpserver.rst.html /library/diff/simplexmlrpcserver.rst.diff /library/diff/simplexmlrpcserver.rst.html /library/diff/site.rst.diff /library/diff/site.rst.html /library/diff/smtplib.rst.diff /library/diff/smtplib.rst.html /library/diff/socket.rst.diff /library/diff/socket.rst.html /library/diff/socketserver.rst.diff /library/diff/socketserver.rst.html /library/diff/sqlite3.rst.diff /library/diff/sqlite3.rst.html /library/diff/ssl.rst.diff /library/diff/ssl.rst.html /library/diff/stat.rst.diff /library/diff/stat.rst.html /library/diff/stdtypes.rst.diff /library/diff/stdtypes.rst.html /library/diff/string.rst.diff /library/diff/string.rst.html /library/diff/stringio.rst.diff /library/diff/stringio.rst.html /library/diff/struct.rst.diff /library/diff/struct.rst.html /library/diff/subprocess.rst.diff /library/diff/subprocess.rst.html /library/diff/sunau.rst.diff /library/diff/sunau.rst.html /library/diff/sunaudio.rst.diff /library/diff/sunaudio.rst.html /library/diff/symtable.rst.diff /library/diff/symtable.rst.html /library/diff/sys.rst.diff /library/diff/sys.rst.html /library/diff/tabnanny.rst.diff /library/diff/tabnanny.rst.html /library/diff/tarfile.rst.diff /library/diff/tarfile.rst.html /library/diff/telnetlib.rst.diff /library/diff/telnetlib.rst.html /library/diff/tempfile.rst.diff /library/diff/tempfile.rst.html /library/diff/termios.rst.diff /library/diff/termios.rst.html /library/diff/test.rst.diff /library/diff/test.rst.html /library/diff/thread.rst.diff /library/diff/thread.rst.html /library/diff/threading.rst.diff /library/diff/threading.rst.html /library/diff/timeit.rst.diff /library/diff/timeit.rst.html /library/diff/tkinter.rst.diff /library/diff/tkinter.rst.html /library/diff/trace.rst.diff /library/diff/trace.rst.html /library/diff/traceback.rst.diff /library/diff/traceback.rst.html /library/diff/turtle.rst.diff /library/diff/turtle.rst.html /library/diff/types.rst.diff /library/diff/types.rst.html /library/diff/undoc.rst.diff /library/diff/undoc.rst.html /library/diff/unittest.rst.diff /library/diff/unittest.rst.html /library/diff/urllib.rst.diff /library/diff/urllib.rst.html /library/diff/urllib2.rst.diff /library/diff/urllib2.rst.html /library/diff/urlparse.rst.diff /library/diff/urlparse.rst.html /library/diff/warnings.rst.diff /library/diff/warnings.rst.html /library/diff/wave.rst.diff /library/diff/wave.rst.html /library/diff/weakref.rst.diff /library/diff/weakref.rst.html /library/diff/webbrowser.rst.diff /library/diff/webbrowser.rst.html /library/diff/wsgiref.rst.diff /library/diff/wsgiref.rst.html /library/diff/xml.dom.minidom.rst.diff /library/diff/xml.dom.minidom.rst.html /library/diff/xml.dom.rst.diff /library/diff/xml.dom.rst.html /library/diff/xml.etree.elementtree.rst.diff /library/diff/xml.etree.elementtree.rst.html /library/diff/xmlrpclib.rst.diff /library/diff/xmlrpclib.rst.html /library/diff/zipfile.rst.diff /library/diff/zipfile.rst.html /library/diff/zipimport.rst.diff /library/diff/zipimport.rst.html /library/diff/zlib.rst.diff /library/diff/zlib.rst.html /library/orig/2to3.rst /library/orig/__builtin__.rst /library/orig/__future__.rst /library/orig/__main__.rst /library/orig/_winreg.rst /library/orig/abc.rst /library/orig/aepack.rst /library/orig/aetools.rst /library/orig/aetypes.rst /library/orig/aifc.rst /library/orig/al.rst /library/orig/allos.rst /library/orig/anydbm.rst /library/orig/archiving.rst /library/orig/array.rst /library/orig/ast.rst /library/orig/asynchat.rst /library/orig/asyncore.rst /library/orig/atexit.rst /library/orig/audioop.rst /library/orig/autogil.rst /library/orig/base64.rst /library/orig/basehttpserver.rst /library/orig/bastion.rst /library/orig/bdb.rst /library/orig/binascii.rst /library/orig/binhex.rst /library/orig/bisect.rst /library/orig/bsddb.rst /library/orig/bz2.rst /library/orig/calendar.rst /library/orig/carbon.rst /library/orig/cd.rst /library/orig/cgi.rst /library/orig/cgihttpserver.rst /library/orig/cgitb.rst /library/orig/chunk.rst /library/orig/cmath.rst /library/orig/cmd.rst /library/orig/code.rst /library/orig/codecs.rst /library/orig/codeop.rst /library/orig/collections.rst /library/orig/colorpicker.rst /library/orig/colorsys.rst /library/orig/commands.rst /library/orig/compileall.rst /library/orig/compiler.rst /library/orig/configparser.rst /library/orig/constants.rst /library/orig/contextlib.rst /library/orig/cookie.rst /library/orig/cookielib.rst /library/orig/copy.rst /library/orig/copy_reg.rst /library/orig/crypt.rst /library/orig/crypto.rst /library/orig/csv.rst /library/orig/ctypes.rst /library/orig/curses.ascii.rst /library/orig/curses.panel.rst /library/orig/curses.rst /library/orig/custominterp.rst /library/orig/datatypes.rst /library/orig/datetime.rst /library/orig/dbhash.rst /library/orig/dbm.rst /library/orig/debug.rst /library/orig/decimal.rst /library/orig/development.rst /library/orig/difflib.rst /library/orig/dircache.rst /library/orig/dis.rst /library/orig/distutils.rst /library/orig/dl.rst /library/orig/doctest.rst /library/orig/docxmlrpcserver.rst /library/orig/dumbdbm.rst /library/orig/dummy_thread.rst /library/orig/dummy_threading.rst /library/orig/easydialogs.rst /library/orig/email-examples.rst /library/orig/email.charset.rst /library/orig/email.encoders.rst /library/orig/email.errors.rst /library/orig/email.generator.rst /library/orig/email.header.rst /library/orig/email.iterators.rst /library/orig/email.message.rst /library/orig/email.mime.rst /library/orig/email.parser.rst /library/orig/email.rst /library/orig/email.util.rst /library/orig/errno.rst /library/orig/exceptions.rst /library/orig/fcntl.rst /library/orig/filecmp.rst /library/orig/fileformats.rst /library/orig/fileinput.rst /library/orig/filesys.rst /library/orig/fl.rst /library/orig/fm.rst /library/orig/fnmatch.rst /library/orig/formatter.rst /library/orig/fpectl.rst /library/orig/fpformat.rst /library/orig/fractions.rst /library/orig/framework.rst /library/orig/frameworks.rst /library/orig/ftplib.rst /library/orig/functions.rst /library/orig/functools.rst /library/orig/future_builtins.rst /library/orig/gc.rst /library/orig/gdbm.rst /library/orig/gensuitemodule.rst /library/orig/getopt.rst /library/orig/getpass.rst /library/orig/gettext.rst /library/orig/gl.rst /library/orig/glob.rst /library/orig/grp.rst /library/orig/gzip.rst /library/orig/hashlib.rst /library/orig/heapq.rst /library/orig/hmac.rst /library/orig/hotshot.rst /library/orig/htmllib.rst /library/orig/htmlparser.rst /library/orig/httplib.rst /library/orig/i18n.rst /library/orig/ic.rst /library/orig/idle.rst /library/orig/imageop.rst /library/orig/imaplib.rst /library/orig/imgfile.rst /library/orig/imghdr.rst /library/orig/imp.rst /library/orig/imputil.rst /library/orig/index.rst /library/orig/inspect.rst /library/orig/internet.rst /library/orig/intro.rst /library/orig/io.rst /library/orig/ipc.rst /library/orig/itertools.rst /library/orig/jpeg.rst /library/orig/json.rst /library/orig/keyword.rst /library/orig/language.rst /library/orig/linecache.rst /library/orig/locale.rst /library/orig/logging.rst /library/orig/mac.rst /library/orig/macos.rst /library/orig/macosa.rst /library/orig/macostools.rst /library/orig/macpath.rst /library/orig/mailbox.rst /library/orig/mailcap.rst /library/orig/markup.rst /library/orig/marshal.rst /library/orig/math.rst /library/orig/md5.rst /library/orig/mhlib.rst /library/orig/mimetools.rst /library/orig/mimetypes.rst /library/orig/mimewriter.rst /library/orig/mimify.rst /library/orig/miniaeframe.rst /library/orig/misc.rst /library/orig/mm.rst /library/orig/mmap.rst /library/orig/modulefinder.rst /library/orig/modules.rst /library/orig/msilib.rst /library/orig/msvcrt.rst /library/orig/multifile.rst /library/orig/multiprocessing.rst /library/orig/mutex.rst /library/orig/netdata.rst /library/orig/netrc.rst /library/orig/new.rst /library/orig/nis.rst /library/orig/nntplib.rst /library/orig/numbers.rst /library/orig/numeric.rst /library/orig/operator.rst /library/orig/optparse.rst /library/orig/os.path.rst /library/orig/os.rst /library/orig/ossaudiodev.rst /library/orig/othergui.rst /library/orig/parser.rst /library/orig/pdb.rst /library/orig/persistence.rst /library/orig/pickle.rst /library/orig/pickletools.rst /library/orig/pipes.rst /library/orig/pkgutil.rst /library/orig/platform.rst /library/orig/plistlib.rst /library/orig/popen2.rst /library/orig/poplib.rst /library/orig/posix.rst /library/orig/posixfile.rst /library/orig/pprint.rst /library/orig/profile.rst /library/orig/pty.rst /library/orig/pwd.rst /library/orig/py_compile.rst /library/orig/pyclbr.rst /library/orig/pydoc.rst /library/orig/pyexpat.rst /library/orig/python.rst /library/orig/queue.rst /library/orig/quopri.rst /library/orig/random.rst /library/orig/re.rst /library/orig/readline.rst /library/orig/repr.rst /library/orig/resource.rst /library/orig/restricted.rst /library/orig/rexec.rst /library/orig/rfc822.rst /library/orig/rlcompleter.rst /library/orig/robotparser.rst /library/orig/runpy.rst /library/orig/sched.rst /library/orig/scrolledtext.rst /library/orig/select.rst /library/orig/sets.rst /library/orig/sgi.rst /library/orig/sgmllib.rst /library/orig/sha.rst /library/orig/shelve.rst /library/orig/shlex.rst /library/orig/shutil.rst /library/orig/signal.rst /library/orig/simplehttpserver.rst /library/orig/simplexmlrpcserver.rst /library/orig/site.rst /library/orig/smtpd.rst /library/orig/smtplib.rst /library/orig/sndhdr.rst /library/orig/socket.rst /library/orig/socketserver.rst /library/orig/someos.rst /library/orig/spwd.rst /library/orig/sqlite3.rst /library/orig/ssl.rst /library/orig/stat.rst /library/orig/statvfs.rst /library/orig/stdtypes.rst /library/orig/string.rst /library/orig/stringio.rst /library/orig/stringprep.rst /library/orig/strings.rst /library/orig/struct.rst /library/orig/subprocess.rst /library/orig/sun.rst /library/orig/sunau.rst /library/orig/sunaudio.rst /library/orig/symbol.rst /library/orig/symtable.rst /library/orig/sys.rst /library/orig/syslog.rst /library/orig/tabnanny.rst /library/orig/tarfile.rst /library/orig/telnetlib.rst /library/orig/tempfile.rst /library/orig/termios.rst /library/orig/test.rst /library/orig/textwrap.rst /library/orig/thread.rst /library/orig/threading.rst /library/orig/time.rst /library/orig/timeit.rst /library/orig/tix.rst /library/orig/tk.rst /library/orig/tkinter.rst /library/orig/token.rst /library/orig/tokenize.rst /library/orig/trace.rst /library/orig/traceback.rst /library/orig/tty.rst /library/orig/turtle.rst /library/orig/types.rst /library/orig/undoc.rst /library/orig/unicodedata.rst /library/orig/unittest.rst /library/orig/unix.rst /library/orig/urllib.rst /library/orig/urllib2.rst /library/orig/urlparse.rst /library/orig/user.rst /library/orig/userdict.rst /library/orig/uu.rst /library/orig/uuid.rst /library/orig/warnings.rst /library/orig/wave.rst /library/orig/weakref.rst /library/orig/webbrowser.rst /library/orig/whichdb.rst /library/orig/windows.rst /library/orig/winsound.rst /library/orig/wsgiref.rst /library/orig/xdrlib.rst /library/orig/xml.dom.minidom.rst /library/orig/xml.dom.pulldom.rst /library/orig/xml.dom.rst /library/orig/xml.etree.elementtree.rst /library/orig/xml.etree.rst /library/orig/xml.sax.handler.rst /library/orig/xml.sax.reader.rst /library/orig/xml.sax.rst /library/orig/xml.sax.utils.rst /library/orig/xmllib.rst /library/orig/xmlrpclib.rst /library/orig/zipfile.rst /library/orig/zipimport.rst /library/orig/zlib.rst ======================================= --- /dev/null +++ /library/diff/2to3.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,367 @@ +--- r262/library/2to3.rst 2009-04-06 06:48:06.719229000 +0900 ++++ r266/library/2to3.rst 2010-07-02 02:48:16.992766000 +0900 +@@ -5,24 +5,26 @@ + + .. sectionauthor:: Benjamin Peterson <benja****@pytho*****> + + 2to3 is a Python program that reads Python 2.x source code and applies a series + of *fixers* to transform it into valid Python 3.x code. The standard library + contains a rich set of fixers that will handle almost all code. 2to3 supporting + library :mod:`lib2to3` is, however, a flexible and generic library, so it is + possible to write your own fixers for 2to3. :mod:`lib2to3` could also be + adapted to custom applications in which Python code needs to be edited + automatically. + + ++.. _2to3-using: ++ + Using 2to3 + ---------- + + 2to3 will usually be installed with the Python interpreter as a script. It is + also located in the :file:`Tools/scripts` directory of the Python root. + + 2to3's basic arguments are a list of files or directories to transform. The + directories are to recursively traversed for Python sources. + + Here is a sample Python 2.x source file, :file:`example.py`:: + + def greet(name): +@@ -43,28 +45,28 @@ + $ 2to3 -w example.py + + After transformation, :file:`example.py` looks like this:: + + def greet(name): + print("Hello, {0}!".format(name)) + print("What's your name?") + name = input() + greet(name) + + Comments and exact indentation are preserved throughout the translation process. + +-By default, 2to3 runs a set of predefined fixers. The :option:`-l` flag lists +-all available fixers. An explicit set of fixers to run can be given with +-:option:`-f`. Likewise the :option:`-x` explicitly disables a fixer. The +-following example runs only the ``imports`` and ``has_key`` fixers:: ++By default, 2to3 runs a set of :ref:`predefined fixers <2to3-fixers>`. The ++:option:`-l` flag lists all available fixers. An explicit set of fixers to run ++can be given with :option:`-f`. Likewise the :option:`-x` explicitly disables a ++fixer. The following example runs only the ``imports`` and ``has_key`` fixers:: + + $ 2to3 -f imports -f has_key example.py + + This command runs every fixer except the ``apply`` fixer:: + + $ 2to3 -x apply example.py + + Some fixers are *explicit*, meaning they aren't run by default and must be + listed on the command line to be run. Here, in addition to the default fixers, + the ``idioms`` fixer is run:: + + $ 2to3 -f all -f idioms example.py +@@ -75,35 +77,297 @@ + but 2to3 cannot fix automatically. In this case, 2to3 will print a warning + beneath the diff for a file. You should address the warning in order to have + compliant 3.x code. + + 2to3 can also refactor doctests. To enable this mode, use the :option:`-d` + flag. Note that *only* doctests will be refactored. This also doesn't require + the module to be valid Python. For example, doctest like examples in a reST + document could also be refactored with this option. + + The :option:`-v` option enables output of more information on the translation + process. + +-When the :option:`-p` is passed, 2to3 treats ``print`` as a function instead of +-a statement. This is useful when ``from __future__ import print_function`` is +-being used. If this option is not given, the print fixer will surround print +-calls in an extra set of parentheses because it cannot differentiate between the +-print statement with parentheses (such as ``print ("a" + "b" + "c")``) and a +-true function call. ++Since some print statements can be parsed as function calls or statements, 2to3 ++cannot always read files containing the print function. When 2to3 detects the ++presence of the ``from __future__ import print_function`` compiler directive, it ++modifies its internal grammar to interpert :func:`print` as a function. This ++change can also be enabled manually with the :option:`-p` flag. Use ++:option:`-p` to run fixers on code that already has had its print statements ++converted. ++ ++ ++.. _2to3-fixers: ++ ++Fixers ++------ ++ ++Each step of transforming code is encapsulated in a fixer. The command ``2to3 ++-l`` lists them. As :ref:`documented above <2to3-using>`, each can be turned on ++and off individually. They are described here in more detail. ++ ++ ++.. 2to3fixer:: apply ++ ++ Removes usage of :func:`apply`. For example ``apply(function, *args, ++ **kwargs)`` is converted to ``function(*args, **kwargs)``. ++ ++.. 2to3fixer:: basestring ++ ++ Converts :class:`basestring` to :class:`str`. ++ ++.. 2to3fixer:: buffer ++ ++ Converts :class:`buffer` to :class:`memoryview`. This fixer is optional ++ because the :class:`memoryview` API is similar but not exactly the same as ++ that of :class:`buffer`. ++ ++.. 2to3fixer:: callable ++ ++ Converts ``callable(x)`` to ``isinstance(x, collections.Callable)``, adding ++ an import to :mod:`collections` if needed. ++ ++.. 2to3fixer:: dict ++ ++ Fixes dictionary iteration methods. :meth:`dict.iteritems` is converted to ++ :meth:`dict.items`, :meth:`dict.iterkeys` to :meth:`dict.keys`, and ++ :meth:`dict.itervalues` to :meth:`dict.values`. Similarly, ++ :meth:`dict.viewitems`, :meth:`dict.viewkeys` and :meth:`dict.viewvalues` are ++ converted respectively to :meth:`dict.items`, :meth:`dict.keys` and ++ :meth:`dict.values`. It also wraps existing usages of :meth:`dict.items`, ++ :meth:`dict.keys`, and :meth:`dict.values` in a call to :class:`list`. ++ ++.. 2to3fixer:: except ++ ++ Converts ``except X, T`` to ``except X as T``. ++ ++.. 2to3fixer:: exec ++ ++ Converts the :keyword:`exec` statement to the :func:`exec` function. ++ ++.. 2to3fixer:: execfile ++ ++ Removes usage of :func:`execfile`. The argument to :func:`execfile` is ++ wrapped in calls to :func:`open`, :func:`compile`, and :func:`exec`. ++ ++.. 2to3fixer:: exitfunc ++ ++ Changes assignment of :attr:`sys.exitfunc` to use of the :mod:`atexit` ++ module. ++ ++.. 2to3fixer:: filter ++ ++ Wraps :func:`filter` usage in a :class:`list` call. ++ ++.. 2to3fixer:: funcattrs ++ ++ Fixes function attributes that have been renamed. For example, ++ ``my_function.func_closure`` is converted to ``my_function.__closure__``. ++ ++.. 2to3fixer:: future ++ ++ Removes ``from __future__ import new_feature`` statements. ++ ++.. 2to3fixer:: getcwdu ++ ++ Renames :func:`os.getcwdu` to :func:`os.getcwd`. ++ ++.. 2to3fixer:: has_key ++ ++ Changes ``dict.has_key(key)`` to ``key in dict``. ++ ++.. 2to3fixer:: idioms ++ ++ This optional fixer performs several transformations that make Python code ++ more idiomatic. Type comparisons like ``type(x) is SomeClass`` and ++ ``type(x) == SomeClass`` are converted to ``isinstance(x, SomeClass)``. ++ ``while 1`` becomes ``while True``. This fixer also tries to make use of ++ :func:`sorted` in appropriate places. For example, this block :: ++ ++ L = list(some_iterable) ++ L.sort() ++ ++ is changed to :: ++ ++ L = sorted(some_iterable) ++ ++.. 2to3fixer:: import ++ ++ Detects sibling imports and converts them to relative imports. ++ ++.. 2to3fixer:: imports ++ ++ Handles module renames in the standard library. ++ ++.. 2to3fixer:: imports2 ++ ++ Handles other modules renames in the standard library. It is separate from ++ the :2to3fixer:`imports` fixer only because of technical limitations. ++ ++.. 2to3fixer:: input ++ ++ Converts ``input(prompt)`` to ``eval(input(prompt))`` ++ ++.. 2to3fixer:: intern ++ ++ Converts :func:`intern` to :func:`sys.intern`. ++ ++.. 2to3fixer:: isinstance ++ ++ Fixes duplicate types in the second argument of :func:`isinstance`. For ++ example, ``isinstance(x, (int, int))`` is converted to ``isinstance(x, ++ (int))``. ++ ++.. 2to3fixer:: itertools_imports ++ ++ Removes imports of :func:`itertools.ifilter`, :func:`itertools.izip`, and ++ :func:`itertools.imap`. Imports of :func:`itertools.ifilterfalse` are also ++ changed to :func:`itertools.filterfalse`. ++ ++.. 2to3fixer:: itertools ++ ++ Changes usage of :func:`itertools.ifilter`, :func:`itertools.izip`, and ++ :func:`itertools.imap` to their built-in equivalents. ++ :func:`itertools.ifilterfalse` is changed to :func:`itertools.filterfalse`. ++ ++.. 2to3fixer:: long ++ ++ Strips the ``L`` prefix on long literals and renames :class:`long` to ++ :class:`int`. ++ ++.. 2to3fixer:: map ++ ++ Wraps :func:`map` in a :class:`list` call. It also changes ``map(None, x)`` ++ to ``list(x)``. Using ``from future_builtins import map`` disables this ++ fixer. ++ ++.. 2to3fixer:: metaclass ++ ++ Converts the old metaclass syntax (``__metaclass__ = Meta`` in the class ++ body) to the new (``class X(metaclass=Meta)``). ++ ++.. 2to3fixer:: methodattrs ++ ++ Fixes old method attribute names. For example, ``meth.im_func`` is converted ++ to ``meth.__func__``. ++ ++.. 2to3fixer:: ne ++ ++ Converts the old not-equal syntax, ``<>``, to ``!=``. ++ ++.. 2to3fixer:: next ++ ++ Converts the use of iterator's :meth:`~iterator.next` methods to the ++ :func:`next` function. It also renames :meth:`next` methods to ++ :meth:`~object.__next__`. ++ ++.. 2to3fixer:: nonzero ++ ++ Renames :meth:`~object.__nonzero__` to :meth:`~object.__bool__`. ++ ++.. 2to3fixer:: numliterals ++ ++ Converts octal literals into the new syntax. ++ ++.. 2to3fixer:: paren ++ ++ Add extra parenthesis where they are required in list comprehensions. For ++ example, ``[x for x in 1, 2]`` becomes ``[x for x in (1, 2)]``. ++ ++.. 2to3fixer:: print ++ ++ Converts the :keyword:`print` statement to the :func:`print` function. ++ ++.. 2to3fixer:: raise ++ ++ Converts ``raise E, V`` to ``raise E(V)``, and ``raise E, V, T`` to ``raise ++ E(V).with_traceback(T)``. If ``E`` is a tuple, the translation will be ++ incorrect because substituting tuples for exceptions has been removed in 3.0. ++ ++.. 2to3fixer:: raw_input ++ ++ Converts :func:`raw_input` to :func:`input`. ++ ++.. 2to3fixer:: reduce ++ ++ Handles the move of :func:`reduce` to :func:`functools.reduce`. ++ ++.. 2to3fixer:: renames ++ ++ Changes :data:`sys.maxint` to :data:`sys.maxsize`. ++ ++.. 2to3fixer:: repr ++ ++ Replaces backtick repr with the :func:`repr` function. ++ ++.. 2to3fixer:: set_literal ++ ++ Replaces use of the :class:`set` constructor with set literals. This fixer ++ is optional. ++ ++.. 2to3fixer:: standard_error ++ ++ Renames :exc:`StandardError` to :exc:`Exception`. ++ ++.. 2to3fixer:: sys_exc ++ ++ Changes the deprecated :data:`sys.exc_value`, :data:`sys.exc_type`, ++ :data:`sys.exc_traceback` to use :func:`sys.exc_info`. ++ ++.. 2to3fixer:: throw ++ ++ Fixes the API change in generator's :meth:`throw` method. ++ ++.. 2to3fixer:: tuple_params ++ ++ Removes implicit tuple parameter unpacking. This fixer inserts temporary ++ variables. ++ ++.. 2to3fixer:: types ++ ++ Fixes code broken from the removal of some members in the :mod:`types` ++ module. ++ ++.. 2to3fixer:: unicode ++ ++ Renames :class:`unicode` to :class:`str`. ++ ++.. 2to3fixer:: urllib ++ ++ Handles the rename of :mod:`urllib` and :mod:`urllib2` to the :mod:`urllib` ++ package. ++ ++.. 2to3fixer:: ws_comma ++ ++ Removes excess whitespace from comma separated items. This fixer is ++ optional. ++ ++.. 2to3fixer:: xrange ++ ++ Renames :func:`xrange` to :func:`range` and wraps existing :func:`range` ++ calls with :class:`list`. ++ ++.. 2to3fixer:: xreadlines ++ ++ Changes ``for x in file.xreadlines()`` to ``for x in file``. ++ ++.. 2to3fixer:: zip ++ ++ Wraps :func:`zip` usage in a :class:`list` call. This is disabled when ++ ``from future_builtins import zip`` appears. + + + :mod:`lib2to3` - 2to3's library + ------------------------------- + + .. module:: lib2to3 + :synopsis: the 2to3 library + .. moduleauthor:: Guido van Rossum + .. moduleauthor:: Collin Winter ++.. moduleauthor:: Benjamin Peterson <benja****@pytho*****> + + +-.. warning:: ++.. note:: + + The :mod:`lib2to3` API should be considered unstable and may change + drastically in the future. + + .. XXX What is the public interface anyway? ======================================= --- /dev/null +++ /library/diff/2to3.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,338 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to57__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/2to3.rst => r266/library/2to3.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to57__0"></td><td class="diff_header" id="from57_9">9</td><td nowrap="nowrap">of *fixers* to transform it into valid Python 3.x code. The standard library</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_10">10</td><td nowrap="nowrap">contains a rich set of fixers that will handle almost all code. 2to3 supporting</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_11">11</td><td nowrap="nowrap">library :mod:`lib2to3` is, however, a flexible and generic library, so it is</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_12">12</td><td nowrap="nowrap">possible to write your own fixers for 2to3. :mod:`lib2to3` could also be</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_13">13</td><td nowrap="nowrap">adapted to custom applications in which Python code needs to be edited</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_14">14</td><td nowrap="nowrap">automatically.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_15">15</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_16">16</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to57__1">n</a></td><td class="diff_header" id="to57_17">17+</td><td nowrap="nowrap"><span class="diff_add">.. _2to3-using:</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_18">18+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from57_17">17</td><td nowrap="nowrap">Using 2to3</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_18">18</td><td nowrap="nowrap">----------</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_19">19</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_20">20</td><td nowrap="nowrap">2to3 will usually be installed with the Python interpreter as a script. It is</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_21">21</td><td nowrap="nowrap">also located in the :file:`Tools/scripts` directory of the Python root.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_22">22</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_23">23</td><td nowrap="nowrap">2to3's basic arguments are a list of files or directories to transform. The</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_24">24</td><td nowrap="nowrap">directories are to recursively traversed for Python sources.</td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to57__1"></td><td class="diff_header" id="from57_47">47</td><td nowrap="nowrap"> def greet(name):</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_48">48</td><td nowrap="nowrap"> print("Hello, {0}!".format(name))</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_49">49</td><td nowrap="nowrap"> print("What's your name?")</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_50">50</td><td nowrap="nowrap"> name = input()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_51">51</td><td nowrap="nowrap"> greet(name)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_52">52</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_53">53</td><td nowrap="nowrap">Comments and exact indentation are preserved throughout the translation process.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_54">54</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to57__2">n</a></td><td class="diff_header" id="from57_55">55-</td><td nowrap="nowrap"><span class="diff_sub">By default, 2to3 runs a set of predefined fixers. The :option:`-l` flag lists</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to57__2">n</a></td><td class="diff_header" id="to57_57">57+</td><td nowrap="nowrap"><span class="diff_add">By default, 2to3 runs a set of :ref:`predefined fixers <2to3-fixers>`. The</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from57_56">56-</td><td nowrap="nowrap"><span class="diff_sub">all available fixers. An explicit set of fixers to run can be given with</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_58">58+</td><td nowrap="nowrap"><span class="diff_add">:option:`-l` flag lists all available fixers. An explicit set of fixers to run</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from57_57">57-</td><td nowrap="nowrap">:option:`-f`. Likewise the :option:`-x` explicitly disables a<span class="diff_sub"> fixer. The</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_59">59+</td><td nowrap="nowrap"><span class="diff_add">can be given with </span>:option:`-f`. Likewise the :option:`-x` explicitly disables a</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from57_58">58-</td><td nowrap="nowrap">following example runs only the ``imports`` and ``has_key`` fixers::</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_60">60+</td><td nowrap="nowrap"><span class="diff_add">fixer. The </span>following example runs only the ``imports`` and ``has_key`` fixers::</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from57_59">59</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_60">60</td><td nowrap="nowrap"> $ 2to3 -f imports -f has_key example.py</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_61">61</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_62">62</td><td nowrap="nowrap">This command runs every fixer except the ``apply`` fixer::</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_63">63</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_64">64</td><td nowrap="nowrap"> $ 2to3 -x apply example.py</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_65">65</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_66">66</td><td nowrap="nowrap">Some fixers are *explicit*, meaning they aren't run by default and must be</td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to57__2"></td><td class="diff_header" id="from57_79">79</td><td nowrap="nowrap">2to3 can also refactor doctests. To enable this mode, use the :option:`-d`</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_80">80</td><td nowrap="nowrap">flag. Note that *only* doctests will be refactored. This also doesn't require</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_81">81</td><td nowrap="nowrap">the module to be valid Python. For example, doctest like examples in a reST</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_82">82</td><td nowrap="nowrap">document could also be refactored with this option.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_83">83</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_84">84</td><td nowrap="nowrap">The :option:`-v` option enables output of more information on the translation</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_85">85</td><td nowrap="nowrap">process.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_86">86</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to57__3">n</a></td><td class="diff_header" id="from57_87">87-</td><td nowrap="nowrap"><span class="diff_sub">When the :option:`-p` is passed, 2to3 treats ``print`` as a function instead of</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to57__3">n</a></td><td class="diff_header" id="to57_89">89+</td><td nowrap="nowrap"><span class="diff_add">Since some print statements can be parsed as function calls or statements, 2to3</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from57_88">88-</td><td nowrap="nowrap"><span class="diff_sub">a statement. This is useful when ``from __future__ import print_function`` is</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_90">90+</td><td nowrap="nowrap"><span class="diff_add">cannot always read files containing the print function. When 2to3 detects the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from57_89">89-</td><td nowrap="nowrap"><span class="diff_sub">being used. If this option is not given, the print fixer will surround print</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_91">91+</td><td nowrap="nowrap"><span class="diff_add">presence of the ``from __future__ import print_function`` compiler directive, it</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from57_90">90-</td><td nowrap="nowrap"><span class="diff_sub">calls in an extra set of parentheses because it cannot differentiate between the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_92">92+</td><td nowrap="nowrap"><span class="diff_add">modifies its internal grammar to interpert :func:`print` as a function. This</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from57_91">91-</td><td nowrap="nowrap"><span class="diff_sub">print statement with parentheses (such as ``print ("a" + "b" + "c")``) and a</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_93">93+</td><td nowrap="nowrap"><span class="diff_add">change can also be enabled manually with the :option:`-p` flag. Use</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from57_92">92-</td><td nowrap="nowrap"><span class="diff_sub">true function call.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_94">94+</td><td nowrap="nowrap"><span class="diff_add">:option:`-p` to run fixers on code that already has had its print statements</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_95">95+</td><td nowrap="nowrap"><span class="diff_add">converted.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_96">96+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_97">97+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_98">98+</td><td nowrap="nowrap"><span class="diff_add">.. _2to3-fixers:</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_99">99+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_100">100+</td><td nowrap="nowrap"><span class="diff_add">Fixers</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_101">101+</td><td nowrap="nowrap"><span class="diff_add">------</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_102">102+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_103">103+</td><td nowrap="nowrap"><span class="diff_add">Each step of transforming code is encapsulated in a fixer. The command ``2to3</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_104">104+</td><td nowrap="nowrap"><span class="diff_add">-l`` lists them. As :ref:`documented above <2to3-using>`, each can be turned on</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_105">105+</td><td nowrap="nowrap"><span class="diff_add">and off individually. They are described here in more detail.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_106">106+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_107">107+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_108">108+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: apply</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_109">109+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_110">110+</td><td nowrap="nowrap"><span class="diff_add"> Removes usage of :func:`apply`. For example ``apply(function, *args,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_111">111+</td><td nowrap="nowrap"><span class="diff_add"> **kwargs)`` is converted to ``function(*args, **kwargs)``.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_112">112+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_113">113+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: basestring</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_114">114+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_115">115+</td><td nowrap="nowrap"><span class="diff_add"> Converts :class:`basestring` to :class:`str`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_116">116+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_117">117+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: buffer</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_118">118+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_119">119+</td><td nowrap="nowrap"><span class="diff_add"> Converts :class:`buffer` to :class:`memoryview`. This fixer is optional</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_120">120+</td><td nowrap="nowrap"><span class="diff_add"> because the :class:`memoryview` API is similar but not exactly the same as</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_121">121+</td><td nowrap="nowrap"><span class="diff_add"> that of :class:`buffer`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_122">122+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_123">123+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: callable</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_124">124+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_125">125+</td><td nowrap="nowrap"><span class="diff_add"> Converts ``callable(x)`` to ``isinstance(x, collections.Callable)``, adding</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_126">126+</td><td nowrap="nowrap"><span class="diff_add"> an import to :mod:`collections` if needed.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_127">127+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_128">128+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: dict</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_129">129+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_130">130+</td><td nowrap="nowrap"><span class="diff_add"> Fixes dictionary iteration methods. :meth:`dict.iteritems` is converted to</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_131">131+</td><td nowrap="nowrap"><span class="diff_add"> :meth:`dict.items`, :meth:`dict.iterkeys` to :meth:`dict.keys`, and</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_132">132+</td><td nowrap="nowrap"><span class="diff_add"> :meth:`dict.itervalues` to :meth:`dict.values`. Similarly,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_133">133+</td><td nowrap="nowrap"><span class="diff_add"> :meth:`dict.viewitems`, :meth:`dict.viewkeys` and :meth:`dict.viewvalues` are</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_134">134+</td><td nowrap="nowrap"><span class="diff_add"> converted respectively to :meth:`dict.items`, :meth:`dict.keys` and</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_135">135+</td><td nowrap="nowrap"><span class="diff_add"> :meth:`dict.values`. It also wraps existing usages of :meth:`dict.items`,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_136">136+</td><td nowrap="nowrap"><span class="diff_add"> :meth:`dict.keys`, and :meth:`dict.values` in a call to :class:`list`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_137">137+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_138">138+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: except</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_139">139+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_140">140+</td><td nowrap="nowrap"><span class="diff_add"> Converts ``except X, T`` to ``except X as T``.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_141">141+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_142">142+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: exec</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_143">143+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_144">144+</td><td nowrap="nowrap"><span class="diff_add"> Converts the :keyword:`exec` statement to the :func:`exec` function.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_145">145+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_146">146+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: execfile</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_147">147+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_148">148+</td><td nowrap="nowrap"><span class="diff_add"> Removes usage of :func:`execfile`. The argument to :func:`execfile` is</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_149">149+</td><td nowrap="nowrap"><span class="diff_add"> wrapped in calls to :func:`open`, :func:`compile`, and :func:`exec`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_150">150+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_151">151+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: exitfunc</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_152">152+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_153">153+</td><td nowrap="nowrap"><span class="diff_add"> Changes assignment of :attr:`sys.exitfunc` to use of the :mod:`atexit`</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_154">154+</td><td nowrap="nowrap"><span class="diff_add"> module.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_155">155+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_156">156+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: filter</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_157">157+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_158">158+</td><td nowrap="nowrap"><span class="diff_add"> Wraps :func:`filter` usage in a :class:`list` call.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_159">159+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_160">160+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: funcattrs</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_161">161+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_162">162+</td><td nowrap="nowrap"><span class="diff_add"> Fixes function attributes that have been renamed. For example,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_163">163+</td><td nowrap="nowrap"><span class="diff_add"> ``my_function.func_closure`` is converted to ``my_function.__closure__``.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_164">164+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_165">165+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: future</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_166">166+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_167">167+</td><td nowrap="nowrap"><span class="diff_add"> Removes ``from __future__ import new_feature`` statements.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_168">168+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_169">169+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: getcwdu</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_170">170+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_171">171+</td><td nowrap="nowrap"><span class="diff_add"> Renames :func:`os.getcwdu` to :func:`os.getcwd`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_172">172+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_173">173+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: has_key</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_174">174+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_175">175+</td><td nowrap="nowrap"><span class="diff_add"> Changes ``dict.has_key(key)`` to ``key in dict``.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_176">176+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_177">177+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: idioms</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_178">178+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_179">179+</td><td nowrap="nowrap"><span class="diff_add"> This optional fixer performs several transformations that make Python code</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_180">180+</td><td nowrap="nowrap"><span class="diff_add"> more idiomatic. Type comparisons like ``type(x) is SomeClass`` and</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_181">181+</td><td nowrap="nowrap"><span class="diff_add"> ``type(x) == SomeClass`` are converted to ``isinstance(x, SomeClass)``.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_182">182+</td><td nowrap="nowrap"><span class="diff_add"> ``while 1`` becomes ``while True``. This fixer also tries to make use of</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_183">183+</td><td nowrap="nowrap"><span class="diff_add"> :func:`sorted` in appropriate places. For example, this block ::</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_184">184+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_185">185+</td><td nowrap="nowrap"><span class="diff_add"> L = list(some_iterable)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_186">186+</td><td nowrap="nowrap"><span class="diff_add"> L.sort()</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_187">187+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_188">188+</td><td nowrap="nowrap"><span class="diff_add"> is changed to ::</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_189">189+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_190">190+</td><td nowrap="nowrap"><span class="diff_add"> L = sorted(some_iterable)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_191">191+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_192">192+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: import</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_193">193+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_194">194+</td><td nowrap="nowrap"><span class="diff_add"> Detects sibling imports and converts them to relative imports.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_195">195+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_196">196+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: imports</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_197">197+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_198">198+</td><td nowrap="nowrap"><span class="diff_add"> Handles module renames in the standard library.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_199">199+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_200">200+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: imports2</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_201">201+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_202">202+</td><td nowrap="nowrap"><span class="diff_add"> Handles other modules renames in the standard library. It is separate from</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_203">203+</td><td nowrap="nowrap"><span class="diff_add"> the :2to3fixer:`imports` fixer only because of technical limitations.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_204">204+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_205">205+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: input</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_206">206+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_207">207+</td><td nowrap="nowrap"><span class="diff_add"> Converts ``input(prompt)`` to ``eval(input(prompt))``</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_208">208+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_209">209+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: intern</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_210">210+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_211">211+</td><td nowrap="nowrap"><span class="diff_add"> Converts :func:`intern` to :func:`sys.intern`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_212">212+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_213">213+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: isinstance</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_214">214+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_215">215+</td><td nowrap="nowrap"><span class="diff_add"> Fixes duplicate types in the second argument of :func:`isinstance`. For</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_216">216+</td><td nowrap="nowrap"><span class="diff_add"> example, ``isinstance(x, (int, int))`` is converted to ``isinstance(x,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_217">217+</td><td nowrap="nowrap"><span class="diff_add"> (int))``.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_218">218+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_219">219+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: itertools_imports</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_220">220+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_221">221+</td><td nowrap="nowrap"><span class="diff_add"> Removes imports of :func:`itertools.ifilter`, :func:`itertools.izip`, and</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_222">222+</td><td nowrap="nowrap"><span class="diff_add"> :func:`itertools.imap`. Imports of :func:`itertools.ifilterfalse` are also</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_223">223+</td><td nowrap="nowrap"><span class="diff_add"> changed to :func:`itertools.filterfalse`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_224">224+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_225">225+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: itertools</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_226">226+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_227">227+</td><td nowrap="nowrap"><span class="diff_add"> Changes usage of :func:`itertools.ifilter`, :func:`itertools.izip`, and</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_228">228+</td><td nowrap="nowrap"><span class="diff_add"> :func:`itertools.imap` to their built-in equivalents.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_229">229+</td><td nowrap="nowrap"><span class="diff_add"> :func:`itertools.ifilterfalse` is changed to :func:`itertools.filterfalse`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_230">230+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_231">231+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: long</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_232">232+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_233">233+</td><td nowrap="nowrap"><span class="diff_add"> Strips the ``L`` prefix on long literals and renames :class:`long` to</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_234">234+</td><td nowrap="nowrap"><span class="diff_add"> :class:`int`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_235">235+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_236">236+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: map</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_237">237+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_238">238+</td><td nowrap="nowrap"><span class="diff_add"> Wraps :func:`map` in a :class:`list` call. It also changes ``map(None, x)``</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_239">239+</td><td nowrap="nowrap"><span class="diff_add"> to ``list(x)``. Using ``from future_builtins import map`` disables this</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_240">240+</td><td nowrap="nowrap"><span class="diff_add"> fixer.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_241">241+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_242">242+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: metaclass</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_243">243+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_244">244+</td><td nowrap="nowrap"><span class="diff_add"> Converts the old metaclass syntax (``__metaclass__ = Meta`` in the class</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_245">245+</td><td nowrap="nowrap"><span class="diff_add"> body) to the new (``class X(metaclass=Meta)``).</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_246">246+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_247">247+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: methodattrs</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_248">248+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_249">249+</td><td nowrap="nowrap"><span class="diff_add"> Fixes old method attribute names. For example, ``meth.im_func`` is converted</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_250">250+</td><td nowrap="nowrap"><span class="diff_add"> to ``meth.__func__``.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_251">251+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_252">252+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: ne</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_253">253+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_254">254+</td><td nowrap="nowrap"><span class="diff_add"> Converts the old not-equal syntax, ``<>``, to ``!=``.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_255">255+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_256">256+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: next</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_257">257+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_258">258+</td><td nowrap="nowrap"><span class="diff_add"> Converts the use of iterator's :meth:`~iterator.next` methods to the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_259">259+</td><td nowrap="nowrap"><span class="diff_add"> :func:`next` function. It also renames :meth:`next` methods to</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_260">260+</td><td nowrap="nowrap"><span class="diff_add"> :meth:`~object.__next__`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_261">261+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_262">262+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: nonzero</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_263">263+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_264">264+</td><td nowrap="nowrap"><span class="diff_add"> Renames :meth:`~object.__nonzero__` to :meth:`~object.__bool__`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_265">265+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_266">266+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: numliterals</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_267">267+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_268">268+</td><td nowrap="nowrap"><span class="diff_add"> Converts octal literals into the new syntax.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_269">269+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_270">270+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: paren</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_271">271+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_272">272+</td><td nowrap="nowrap"><span class="diff_add"> Add extra parenthesis where they are required in list comprehensions. For</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_273">273+</td><td nowrap="nowrap"><span class="diff_add"> example, ``[x for x in 1, 2]`` becomes ``[x for x in (1, 2)]``.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_274">274+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_275">275+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: print</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_276">276+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_277">277+</td><td nowrap="nowrap"><span class="diff_add"> Converts the :keyword:`print` statement to the :func:`print` function.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_278">278+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_279">279+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: raise</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_280">280+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_281">281+</td><td nowrap="nowrap"><span class="diff_add"> Converts ``raise E, V`` to ``raise E(V)``, and ``raise E, V, T`` to ``raise</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_282">282+</td><td nowrap="nowrap"><span class="diff_add"> E(V).with_traceback(T)``. If ``E`` is a tuple, the translation will be</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_283">283+</td><td nowrap="nowrap"><span class="diff_add"> incorrect because substituting tuples for exceptions has been removed in 3.0.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_284">284+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_285">285+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: raw_input</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_286">286+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_287">287+</td><td nowrap="nowrap"><span class="diff_add"> Converts :func:`raw_input` to :func:`input`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_288">288+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_289">289+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: reduce</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_290">290+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_291">291+</td><td nowrap="nowrap"><span class="diff_add"> Handles the move of :func:`reduce` to :func:`functools.reduce`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_292">292+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_293">293+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: renames</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_294">294+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_295">295+</td><td nowrap="nowrap"><span class="diff_add"> Changes :data:`sys.maxint` to :data:`sys.maxsize`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_296">296+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_297">297+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: repr</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_298">298+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_299">299+</td><td nowrap="nowrap"><span class="diff_add"> Replaces backtick repr with the :func:`repr` function.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_300">300+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_301">301+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: set_literal</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_302">302+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_303">303+</td><td nowrap="nowrap"><span class="diff_add"> Replaces use of the :class:`set` constructor with set literals. This fixer</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_304">304+</td><td nowrap="nowrap"><span class="diff_add"> is optional.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_305">305+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_306">306+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: standard_error</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_307">307+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_308">308+</td><td nowrap="nowrap"><span class="diff_add"> Renames :exc:`StandardError` to :exc:`Exception`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_309">309+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_310">310+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: sys_exc</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_311">311+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_312">312+</td><td nowrap="nowrap"><span class="diff_add"> Changes the deprecated :data:`sys.exc_value`, :data:`sys.exc_type`,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_313">313+</td><td nowrap="nowrap"><span class="diff_add"> :data:`sys.exc_traceback` to use :func:`sys.exc_info`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_314">314+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_315">315+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: throw</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_316">316+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_317">317+</td><td nowrap="nowrap"><span class="diff_add"> Fixes the API change in generator's :meth:`throw` method.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_318">318+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_319">319+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: tuple_params</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_320">320+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_321">321+</td><td nowrap="nowrap"><span class="diff_add"> Removes implicit tuple parameter unpacking. This fixer inserts temporary</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_322">322+</td><td nowrap="nowrap"><span class="diff_add"> variables.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_323">323+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_324">324+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: types</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_325">325+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_326">326+</td><td nowrap="nowrap"><span class="diff_add"> Fixes code broken from the removal of some members in the :mod:`types`</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_327">327+</td><td nowrap="nowrap"><span class="diff_add"> module.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_328">328+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_329">329+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: unicode</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_330">330+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_331">331+</td><td nowrap="nowrap"><span class="diff_add"> Renames :class:`unicode` to :class:`str`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_332">332+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_333">333+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: urllib</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_334">334+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_335">335+</td><td nowrap="nowrap"><span class="diff_add"> Handles the rename of :mod:`urllib` and :mod:`urllib2` to the :mod:`urllib`</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_336">336+</td><td nowrap="nowrap"><span class="diff_add"> package.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_337">337+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_338">338+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: ws_comma</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_339">339+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_340">340+</td><td nowrap="nowrap"><span class="diff_add"> Removes excess whitespace from comma separated items. This fixer is</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_341">341+</td><td nowrap="nowrap"><span class="diff_add"> optional.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_342">342+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_343">343+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: xrange</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_344">344+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_345">345+</td><td nowrap="nowrap"><span class="diff_add"> Renames :func:`xrange` to :func:`range` and wraps existing :func:`range`</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_346">346+</td><td nowrap="nowrap"><span class="diff_add"> calls with :class:`list`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_347">347+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_348">348+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: xreadlines</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_349">349+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_350">350+</td><td nowrap="nowrap"><span class="diff_add"> Changes ``for x in file.xreadlines()`` to ``for x in file``.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_351">351+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_352">352+</td><td nowrap="nowrap"><span class="diff_add">.. 2to3fixer:: zip</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_353">353+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_354">354+</td><td nowrap="nowrap"><span class="diff_add"> Wraps :func:`zip` usage in a :class:`list` call. This is disabled when</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to57_355">355+</td><td nowrap="nowrap"><span class="diff_add"> ``from future_builtins import zip`` appears.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from57_93">93</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to57__3"></td><td class="diff_header" id="from57_94">94</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_95">95</td><td nowrap="nowrap">:mod:`lib2to3` - 2to3's library</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_96">96</td><td nowrap="nowrap">-------------------------------</td></tr> <tr><td class="diff_next" id="difflib_chg_to57__4"></td><td class="diff_header" id="from57_97">97</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_98">98</td><td nowrap="nowrap">.. module:: lib2to3</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_99">99</td><td nowrap="nowrap"> :synopsis: the 2to3 library</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_100">100</td><td nowrap="nowrap">.. moduleauthor:: Guido van Rossum</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_101">101</td><td nowrap="nowrap">.. moduleauthor:: Collin Winter</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to57__4">n</a></td><td class="diff_header" id="to57_365">365+</td><td nowrap="nowrap"><span class="diff_add">.. moduleauthor:: Benjamin Peterson <benja****@pytho*****></span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from57_102">102</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_103">103</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to57__top">t</a></td><td class="diff_header" id="from57_104">104-</td><td nowrap="nowrap"><span class="diff_sub">.. warning::</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to57__top">t</a></td><td class="diff_header" id="to57_368">368+</td><td nowrap="nowrap"><span class="diff_add">.. note::</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from57_105">105</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_106">106</td><td nowrap="nowrap"> The :mod:`lib2to3` API should be considered unstable and may change</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_107">107</td><td nowrap="nowrap"> drastically in the future.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_108">108</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from57_109">109</td><td nowrap="nowrap">.. XXX What is the public interface anyway?</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/__builtin__.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,51 @@ +--- r262/library/__builtin__.rst 2008-01-06 05:33:46.954265000 +0900 ++++ r266/library/__builtin__.rst 2010-04-18 18:46:52.942686000 +0900 +@@ -1,41 +1,42 @@ + + :mod:`__builtin__` --- Built-in objects + ======================================= + + .. module:: __builtin__ + :synopsis: The module that provides the built-in namespace. + + + This module provides direct access to all 'built-in' identifiers of Python; for + example, ``__builtin__.open`` is the full name for the built-in function +-:func:`open`. See chapter :ref:`builtin`. ++:func:`open`. + + This module is not normally accessed explicitly by most applications, but can be + useful in modules that provide objects with the same name as a built-in value, + but in which the built-in of that name is also needed. For example, in a module + that wants to implement an :func:`open` function that wraps the built-in + :func:`open`, this module can be used directly:: + + import __builtin__ + + def open(path): + f = __builtin__.open(path, 'r') + return UpperCaser(f) + + class UpperCaser: + '''Wrapper around a file that converts output to upper-case.''' + + def __init__(self, f): + self._f = f + + def read(self, count=-1): + return self._f.read(count).upper() + + # ... + +-As an implementation detail, most modules have the name ``__builtins__`` (note +-the ``'s'``) made available as part of their globals. The value of +-``__builtins__`` is normally either this module or the value of this modules's +-:attr:`__dict__` attribute. Since this is an implementation detail, it may not +-be used by alternate implementations of Python. ++.. impl-detail:: + ++ Most modules have the name ``__builtins__`` (note the ``'s'``) made available ++ as part of their globals. The value of ``__builtins__`` is normally either ++ this module or the value of this modules's :attr:`__dict__` attribute. Since ++ this is an implementation detail, it may not be used by alternate ++ implementations of Python. ======================================= --- /dev/null +++ /library/diff/__builtin__.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,63 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to58__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/__builtin__.rst => r266/library/__builtin__.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to58__0"></td><td class="diff_header" id="from58_3">3</td><td nowrap="nowrap">=======================================</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_4">4</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_5">5</td><td nowrap="nowrap">.. module:: __builtin__</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_6">6</td><td nowrap="nowrap"> :synopsis: The module that provides the built-in namespace.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_7">7</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_8">8</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_9">9</td><td nowrap="nowrap">This module provides direct access to all 'built-in' identifiers of Python; for</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_10">10</td><td nowrap="nowrap">example, ``__builtin__.open`` is the full name for the built-in function</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to58__1">n</a></td><td class="diff_header" id="from58_11">11-</td><td nowrap="nowrap"><span class="diff_sub">:func:`open`. See chapter :ref:`builtin`.</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to58__1">n</a></td><td class="diff_header" id="to58_11">11+</td><td nowrap="nowrap"><span class="diff_add">:func:`open`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from58_12">12</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_13">13</td><td nowrap="nowrap">This module is not normally accessed explicitly by most applications, but can be</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_14">14</td><td nowrap="nowrap">useful in modules that provide objects with the same name as a built-in value,</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_15">15</td><td nowrap="nowrap">but in which the built-in of that name is also needed. For example, in a module</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_16">16</td><td nowrap="nowrap">that wants to implement an :func:`open` function that wraps the built-in</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_17">17</td><td nowrap="nowrap">:func:`open`, this module can be used directly::</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_18">18</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_19">19</td><td nowrap="nowrap"> import __builtin__</td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to58__1"></td><td class="diff_header" id="from58_28">28</td><td nowrap="nowrap"> def __init__(self, f):</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_29">29</td><td nowrap="nowrap"> self._f = f</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_30">30</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_31">31</td><td nowrap="nowrap"> def read(self, count=-1):</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_32">32</td><td nowrap="nowrap"> return self._f.read(count).upper()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_33">33</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to58__2"></td><td class="diff_header" id="from58_34">34</td><td nowrap="nowrap"> # ...</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from58_35">35</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to58__2">n</a></td><td class="diff_header" id="from58_36">36-</td><td nowrap="nowrap"><span class="diff_sub">As an implementation detail, most modules have the name ``__builtins__`` (note</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to58__2">n</a></td><td class="diff_header" id="to58_36">36+</td><td nowrap="nowrap"><span class="diff_add">.. impl-detail::</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from58_37">37-</td><td nowrap="nowrap"><span class="diff_sub">the ``'s'``) made available as part of their globals. The value of</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from58_38">38-</td><td nowrap="nowrap"><span class="diff_sub">``__builtins__`` is normally either this module or the value of this modules's</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from58_39">39-</td><td nowrap="nowrap"><span class="diff_sub">:attr:`__dict__` attribute. Since this is an implementation detail, it may not</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from58_40">40-</td><td nowrap="nowrap"><span class="diff_sub">be used by alternate implementations of Python.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from58_41">41</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to58__top">t</a></td><td class="diff_header" id="to58_38">38+</td><td nowrap="nowrap"><span class="diff_add"> Most modules have the name ``__builtins__`` (note the ``'s'``) made available</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to58_39">39+</td><td nowrap="nowrap"><span class="diff_add"> as part of their globals. The value of ``__builtins__`` is normally either</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to58_40">40+</td><td nowrap="nowrap"><span class="diff_add"> this module or the value of this modules's :attr:`__dict__` attribute. Since</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to58_41">41+</td><td nowrap="nowrap"><span class="diff_add"> this is an implementation detail, it may not be used by alternate</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to58_42">42+</td><td nowrap="nowrap"><span class="diff_add"> implementations of Python.</span></td></tr> + </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/__future__.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,85 @@ +--- r262/library/__future__.rst 2008-07-13 05:16:19.414850000 +0900 ++++ r266/library/__future__.rst 2009-10-27 23:50:20.761604000 +0900 +@@ -1,27 +1,27 @@ + :mod:`__future__` --- Future statement definitions + ================================================== + + .. module:: __future__ + :synopsis: Future statement definitions + + + :mod:`__future__` is a real module, and serves three purposes: + + * To avoid confusing existing tools that analyze import statements and expect to + find the modules they're importing. + +-* To ensure that future_statements run under releases prior to 2.1 at least +- yield runtime exceptions (the import of :mod:`__future__` will fail, because +- there was no module of that name prior to 2.1). ++* To ensure that :ref:`future statements <future>` run under releases prior to ++ 2.1 at least yield runtime exceptions (the import of :mod:`__future__` will ++ fail, because there was no module of that name prior to 2.1). + + * To document when incompatible changes were introduced, and when they will be + --- or were --- made mandatory. This is a form of executable documentation, and + can be inspected programmatically via importing :mod:`__future__` and examining + its contents. + + Each statement in :file:`__future__.py` is of the form:: + + FeatureName = _Feature(OptionalRelease, MandatoryRelease, + CompilerFlag) + + +@@ -43,18 +43,49 @@ + + Else *MandatoryRelease* records when the feature became part of the language; in + releases at or after that, modules no longer need a future statement to use the + feature in question, but may continue to use such imports. + + *MandatoryRelease* may also be ``None``, meaning that a planned feature got + dropped. + + Instances of class :class:`_Feature` have two corresponding methods, + :meth:`getOptionalRelease` and :meth:`getMandatoryRelease`. + + *CompilerFlag* is the (bitfield) flag that should be passed in the fourth +-argument to the builtin function :func:`compile` to enable the feature in ++argument to the built-in function :func:`compile` to enable the feature in + dynamically compiled code. This flag is stored in the :attr:`compiler_flag` + attribute on :class:`_Feature` instances. + +-No feature description will ever be deleted from :mod:`__future__`. ++No feature description will ever be deleted from :mod:`__future__`. Since its ++introduction in Python 2.1 the following features have found their way into the ++language using this mechanism: ++ +++------------------+-------------+--------------+---------------------------------------------+ ++| feature | optional in | mandatory in | effect | +++==================+=============+==============+=============================================+ ++| nested_scopes | 2.1.0b1 | 2.2 | :pep:`227`: | ++| | | | *Statically Nested Scopes* | +++------------------+-------------+--------------+---------------------------------------------+ ++| generators | 2.2.0a1 | 2.3 | :pep:`255`: | ++| | | | *Simple Generators* | +++------------------+-------------+--------------+---------------------------------------------+ ++| division | 2.2.0a2 | 3.0 | :pep:`238`: | ++| | | | *Changing the Division Operator* | +++------------------+-------------+--------------+---------------------------------------------+ ++| absolute_import | 2.5.0a1 | 2.7 | :pep:`328`: | ++| | | | *Imports: Multi-Line and Absolute/Relative* | +++------------------+-------------+--------------+---------------------------------------------+ ++| with_statement | 2.5.0a1 | 2.6 | :pep:`343`: | ++| | | | *The "with" Statement* | +++------------------+-------------+--------------+---------------------------------------------+ ++| print_function | 2.6.0a2 | 3.0 | :pep:`3105`: | ++| | | | *Make print a function* | +++------------------+-------------+--------------+---------------------------------------------+ ++| unicode_literals | 2.6.0a2 | 3.0 | :pep:`3112`: | ++| | | | *Bytes literals in Python 3000* | +++------------------+-------------+--------------+---------------------------------------------+ + ++.. seealso:: ++ ++ :ref:`future` ++ How the compiler treats future imports. ======================================= --- /dev/null +++ /library/diff/__future__.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,91 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to59__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/__future__.rst => r266/library/__future__.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to59__0"></td><td class="diff_header" id="from59_5">5</td><td nowrap="nowrap"> :synopsis: Future statement definitions</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_6">6</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_7">7</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_8">8</td><td nowrap="nowrap">:mod:`__future__` is a real module, and serves three purposes:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_9">9</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_10">10</td><td nowrap="nowrap">* To avoid confusing existing tools that analyze import statements and expect to</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_11">11</td><td nowrap="nowrap"> find the modules they're importing.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_12">12</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to59__1">n</a></td><td class="diff_header" id="from59_13">13-</td><td nowrap="nowrap">* To ensure that future<span class="diff_chg">_</span>statements run under releases prior to<span class="diff_sub"> 2.1 at least</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to59__1">n</a></td><td class="diff_header" id="to59_13">13+</td><td nowrap="nowrap">* To ensure that <span class="diff_add">:ref:`</span>future<span class="diff_chg"> </span>statements <span class="diff_add"><future>` </span>run under releases prior to</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from59_14">14-</td><td nowrap="nowrap"> yield runtime exceptions (the import of :mod:`__future__` will<span class="diff_sub"> fail, because</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_14">14+</td><td nowrap="nowrap"> <span class="diff_add"> 2.1 at least</span> yield runtime exceptions (the import of :mod:`__future__` will</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from59_15">15-</td><td nowrap="nowrap"> there was no module of that name prior to 2.1).</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_15">15+</td><td nowrap="nowrap"> <span class="diff_add"> fail, because</span> there was no module of that name prior to 2.1).</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from59_16">16</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_17">17</td><td nowrap="nowrap">* To document when incompatible changes were introduced, and when they will be</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_18">18</td><td nowrap="nowrap"> --- or were --- made mandatory. This is a form of executable documentation, and</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_19">19</td><td nowrap="nowrap"> can be inspected programmatically via importing :mod:`__future__` and examining</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_20">20</td><td nowrap="nowrap"> its contents.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_21">21</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_22">22</td><td nowrap="nowrap">Each statement in :file:`__future__.py` is of the form::</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_23">23</td><td nowrap="nowrap"></td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to59__1"></td><td class="diff_header" id="from59_47">47</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_48">48</td><td nowrap="nowrap">*MandatoryRelease* may also be ``None``, meaning that a planned feature got</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_49">49</td><td nowrap="nowrap">dropped.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_50">50</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to59__2"></td><td class="diff_header" id="from59_51">51</td><td nowrap="nowrap">Instances of class :class:`_Feature` have two corresponding methods,</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_52">52</td><td nowrap="nowrap">:meth:`getOptionalRelease` and :meth:`getMandatoryRelease`.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_53">53</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_54">54</td><td nowrap="nowrap">*CompilerFlag* is the (bitfield) flag that should be passed in the fourth</td></tr><tr><td class="diff_next" id="difflib_chg_to59__3"><a href="#difflib_chg_to59__2">n</a></td><td class="diff_header" id="from59_55">55-</td><td nowrap="nowrap">argument to the builtin function :func:`compile` to enable the feature in</td></tr> +<tr><td class="diff_next" id="difflib_chg_to59__3"><a href="#difflib_chg_to59__2">n</a></td><td class="diff_header" id="to59_55">55+</td><td nowrap="nowrap">argument to the built<span class="diff_add">-</span>in function :func:`compile` to enable the feature in</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from59_56">56</td><td nowrap="nowrap">dynamically compiled code. This flag is stored in the :attr:`compiler_flag`</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_57">57</td><td nowrap="nowrap">attribute on :class:`_Feature` instances.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from59_58">58</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to59__3">n</a></td><td class="diff_header" id="from59_59">59-</td><td nowrap="nowrap">No feature description will ever be deleted from :mod:`__future__`.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to59__3">n</a></td><td class="diff_header" id="to59_59">59+</td><td nowrap="nowrap">No feature description will ever be deleted from :mod:`__future__`.<span class="diff_add"> Since its</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_60">60+</td><td nowrap="nowrap"><span class="diff_add">introduction in Python 2.1 the following features have found their way into the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_61">61+</td><td nowrap="nowrap"><span class="diff_add">language using this mechanism:</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from59_60">60</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to59__top">t</a></td><td class="diff_header" id="to59_63">63+</td><td nowrap="nowrap"><span class="diff_add">+------------------+-------------+--------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_64">64+</td><td nowrap="nowrap"><span class="diff_add">| feature | optional in | mandatory in | effect | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_65">65+</td><td nowrap="nowrap"><span class="diff_add">+==================+=============+==============+=============================================+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_66">66+</td><td nowrap="nowrap"><span class="diff_add">| nested_scopes | 2.1.0b1 | 2.2 | :pep:`227`: | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_67">67+</td><td nowrap="nowrap"><span class="diff_add">| | | | *Statically Nested Scopes* | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_68">68+</td><td nowrap="nowrap"><span class="diff_add">+------------------+-------------+--------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_69">69+</td><td nowrap="nowrap"><span class="diff_add">| generators | 2.2.0a1 | 2.3 | :pep:`255`: | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_70">70+</td><td nowrap="nowrap"><span class="diff_add">| | | | *Simple Generators* | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_71">71+</td><td nowrap="nowrap"><span class="diff_add">+------------------+-------------+--------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_72">72+</td><td nowrap="nowrap"><span class="diff_add">| division | 2.2.0a2 | 3.0 | :pep:`238`: | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_73">73+</td><td nowrap="nowrap"><span class="diff_add">| | | | *Changing the Division Operator* | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_74">74+</td><td nowrap="nowrap"><span class="diff_add">+------------------+-------------+--------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_75">75+</td><td nowrap="nowrap"><span class="diff_add">| absolute_import | 2.5.0a1 | 2.7 | :pep:`328`: | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_76">76+</td><td nowrap="nowrap"><span class="diff_add">| | | | *Imports: Multi-Line and Absolute/Relative* | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_77">77+</td><td nowrap="nowrap"><span class="diff_add">+------------------+-------------+--------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_78">78+</td><td nowrap="nowrap"><span class="diff_add">| with_statement | 2.5.0a1 | 2.6 | :pep:`343`: | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_79">79+</td><td nowrap="nowrap"><span class="diff_add">| | | | *The "with" Statement* | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_80">80+</td><td nowrap="nowrap"><span class="diff_add">+------------------+-------------+--------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_81">81+</td><td nowrap="nowrap"><span class="diff_add">| print_function | 2.6.0a2 | 3.0 | :pep:`3105`: | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_82">82+</td><td nowrap="nowrap"><span class="diff_add">| | | | *Make print a function* | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_83">83+</td><td nowrap="nowrap"><span class="diff_add">+------------------+-------------+--------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_84">84+</td><td nowrap="nowrap"><span class="diff_add">| unicode_literals | 2.6.0a2 | 3.0 | :pep:`3112`: | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_85">85+</td><td nowrap="nowrap"><span class="diff_add">| | | | *Bytes literals in Python 3000* | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_86">86+</td><td nowrap="nowrap"><span class="diff_add">+------------------+-------------+--------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_87">87+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_88">88+</td><td nowrap="nowrap"><span class="diff_add">.. seealso::</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_89">89+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_90">90+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`future`</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to59_91">91+</td><td nowrap="nowrap"><span class="diff_add"> How the compiler treats future imports.</span></td></tr> + </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/_winreg.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,793 @@ +--- r262/library/_winreg.rst 2009-04-06 06:26:31.956399000 +0900 ++++ r266/library/_winreg.rst 2010-05-12 04:32:26.427070000 +0900 +@@ -6,443 +6,649 @@ + :synopsis: Routines and objects for manipulating the Windows registry. + .. sectionauthor:: Mark Hammond <MarkH****@Activ*****> + + .. note:: + The :mod:`_winreg` module has been renamed to :mod:`winreg` in Python 3.0. + The :term:`2to3` tool will automatically adapt imports when converting your + sources to 3.0. + + + .. versionadded:: 2.0 + + These functions expose the Windows registry API to Python. Instead of using an +-integer as the registry handle, a handle object is used to ensure that the +-handles are closed correctly, even if the programmer neglects to explicitly +-close them. +- +-This module exposes a very low-level interface to the Windows registry; it is +-expected that in the future a new ``winreg`` module will be created offering a +-higher-level interface to the registry API. ++integer as the registry handle, a :ref:`handle object <handle-object>` is used ++to ensure that the handles are closed correctly, even if the programmer neglects ++to explicitly close them. + + This module offers the following functions: + + + .. function:: CloseKey(hkey) + +- Closes a previously opened registry key. The hkey argument specifies a ++ Closes a previously opened registry key. The *hkey* argument specifies a + previously opened key. + +- Note that if *hkey* is not closed using this method (or via +- :meth:`handle.Close`), it is closed when the *hkey* object is destroyed by +- Python. ++ .. note:: ++ If *hkey* is not closed using this method (or via :meth:`hkey.Close() <PyHKEY.Close>`), ++ it is closed when the *hkey* object is destroyed by Python. + + + .. function:: ConnectRegistry(computer_name, key) + +- Establishes a connection to a predefined registry handle on another computer, +- and returns a :dfn:`handle object` ++ Establishes a connection to a predefined registry handle on another computer, ++ and returns a :ref:`handle object <handle-object>`. + +- *computer_name* is the name of the remote computer, of the form ++ *computer_name* is the name of the remote computer, of the form + ``r"\\computername"``. If ``None``, the local computer is used. + + *key* is the predefined handle to connect to. + + The return value is the handle of the opened key. If the function fails, a +- :exc:`WindowsError` exception is raised. ++ :exc:`WindowsError` exception is raised. + + + .. function:: CreateKey(key, sub_key) + +- Creates or opens the specified key, returning a :dfn:`handle object` ++ Creates or opens the specified key, returning a ++ :ref:`handle object <handle-object>`. + +- *key* is an already open key, or one of the predefined :const:`HKEY_\*` +- constants. ++ *key* is an already open key, or one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. + +- *sub_key* is a string that names the key this method opens or creates. ++ *sub_key* is a string that names the key this method opens or creates. + +- If *key* is one of the predefined keys, *sub_key* may be ``None``. In that +- case, the handle returned is the same key handle passed in to the function. ++ If *key* is one of the predefined keys, *sub_key* may be ``None``. In that ++ case, the handle returned is the same key handle passed in to the function. + + If the key already exists, this function opens the existing key. + + The return value is the handle of the opened key. If the function fails, a +- :exc:`WindowsError` exception is raised. ++ :exc:`WindowsError` exception is raised. + + + .. function:: DeleteKey(key, sub_key) + + Deletes the specified key. + +- *key* is an already open key, or any one of the predefined :const:`HKEY_\*` +- constants. ++ *key* is an already open key, or any one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. + + *sub_key* is a string that must be a subkey of the key identified by the *key* + parameter. This value must not be ``None``, and the key may not have subkeys. + + *This method can not delete keys with subkeys.* + + If the method succeeds, the entire key, including all of its values, is removed. +- If the method fails, a :exc:`WindowsError` exception is raised. ++ If the method fails, a :exc:`WindowsError` exception is raised. + + + .. function:: DeleteValue(key, value) + + Removes a named value from a registry key. + +- *key* is an already open key, or one of the predefined :const:`HKEY_\*` +- constants. ++ *key* is an already open key, or one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. + + *value* is a string that identifies the value to remove. + + + .. function:: EnumKey(key, index) + + Enumerates subkeys of an open registry key, returning a string. + +- *key* is an already open key, or any one of the predefined :const:`HKEY_\*` +- constants. ++ *key* is an already open key, or any one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. + +- *index* is an integer that identifies the index of the key to retrieve. ++ *index* is an integer that identifies the index of the key to retrieve. + +- The function retrieves the name of one subkey each time it is called. It is +- typically called repeatedly until a :exc:`WindowsError` exception is ++ The function retrieves the name of one subkey each time it is called. It is ++ typically called repeatedly until a :exc:`WindowsError` exception is + raised, indicating, no more values are available. + + + .. function:: EnumValue(key, index) + + Enumerates values of an open registry key, returning a tuple. + +- *key* is an already open key, or any one of the predefined :const:`HKEY_\*` +- constants. ++ *key* is an already open key, or any one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. + +- *index* is an integer that identifies the index of the value to retrieve. ++ *index* is an integer that identifies the index of the value to retrieve. + +- The function retrieves the name of one subkey each time it is called. It is +- typically called repeatedly, until a :exc:`WindowsError` exception is +- raised, indicating no more values. ++ The function retrieves the name of one subkey each time it is called. It is ++ typically called repeatedly, until a :exc:`WindowsError` exception is ++ raised, indicating no more values. + + The result is a tuple of 3 items: + + +-------+--------------------------------------------+ + | Index | Meaning | + +=======+============================================+ + | ``0`` | A string that identifies the value name | + +-------+--------------------------------------------+ + | ``1`` | An object that holds the value data, and | + | | whose type depends on the underlying | + | | registry type | + +-------+--------------------------------------------+ + | ``2`` | An integer that identifies the type of the | +- | | value data | ++ | | value data (see table in docs for | ++ | | :meth:`SetValueEx`) | + +-------+--------------------------------------------+ + + + .. function:: ExpandEnvironmentStrings(unicode) + +- Expands environment strings %NAME% in unicode string like const:`REG_EXPAND_SZ`:: ++ Expands environment variable placeholders ``%NAME%`` in unicode strings like ++ :const:`REG_EXPAND_SZ`:: + + >>> ExpandEnvironmentStrings(u"%windir%") + u"C:\\Windows" + + .. versionadded:: 2.6 + + + .. function:: FlushKey(key) + + Writes all the attributes of a key to the registry. + +- *key* is an already open key, or one of the predefined :const:`HKEY_\*` +- constants. ++ *key* is an already open key, or one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. + + It is not necessary to call :func:`FlushKey` to change a key. Registry changes are +- flushed to disk by the registry using its lazy flusher. Registry changes are +- also flushed to disk at system shutdown. Unlike :func:`CloseKey`, the +- :func:`FlushKey` method returns only when all the data has been written to the ++ flushed to disk by the registry using its lazy flusher. Registry changes are ++ also flushed to disk at system shutdown. Unlike :func:`CloseKey`, the ++ :func:`FlushKey` method returns only when all the data has been written to the + registry. An application should only call :func:`FlushKey` if it requires +- absolute certainty that registry changes are on disk. ++ absolute certainty that registry changes are on disk. + + .. note:: + +- If you don't know whether a :func:`FlushKey` call is required, it probably ++ If you don't know whether a :func:`FlushKey` call is required, it probably + isn't. + + + .. function:: LoadKey(key, sub_key, file_name) + +- Creates a subkey under the specified key and stores registration information ++ Creates a subkey under the specified key and stores registration information + from a specified file into that subkey. + +- *key* is an already open key, or any of the predefined :const:`HKEY_\*` +- constants. ++ *key* is a handle returned by :func:`ConnectRegistry` or one of the constants ++ :const:`HKEY_USERS` or :const:`HKEY_LOCAL_MACHINE`. + +- *sub_key* is a string that identifies the sub_key to load. ++ *sub_key* is a string that identifies the subkey to load. + + *file_name* is the name of the file to load registry data from. This file must + have been created with the :func:`SaveKey` function. Under the file allocation + table (FAT) file system, the filename may not have an extension. + +- A call to LoadKey() fails if the calling process does not have the +- :const:`SE_RESTORE_PRIVILEGE` privilege. Note that privileges are different than +- permissions - see the Win32 documentation for more details. +- +- If *key* is a handle returned by :func:`ConnectRegistry`, then the path +- specified in *fileName* is relative to the remote computer. ++ A call to :func:`LoadKey` fails if the calling process does not have the ++ :const:`SE_RESTORE_PRIVILEGE` privilege. Note that privileges are different ++ from permissions -- see the `RegLoadKey documentation ++ <http://msdn.microsoft.com/en-us/library/ms724889%28v=VS.85%29.aspx>`_ for ++ more details. + +- The Win32 documentation implies *key* must be in the :const:`HKEY_USER` or +- :const:`HKEY_LOCAL_MACHINE` tree. This may or may not be true. ++ If *key* is a handle returned by :func:`ConnectRegistry`, then the path ++ specified in *file_name* is relative to the remote computer. + + +-.. function:: OpenKey(key, sub_key[, res=0][, sam=KEY_READ]) ++.. function:: OpenKey(key, sub_key[, res[, sam]]) + +- Opens the specified key, returning a :dfn:`handle object` ++ Opens the specified key, returning a :ref:`handle object <handle-object>`. + +- *key* is an already open key, or any one of the predefined :const:`HKEY_\*` +- constants. ++ *key* is an already open key, or any one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. + + *sub_key* is a string that identifies the sub_key to open. + + *res* is a reserved integer, and must be zero. The default is zero. + +- *sam* is an integer that specifies an access mask that describes the desired +- security access for the key. Default is :const:`KEY_READ` ++ *sam* is an integer that specifies an access mask that describes the desired ++ security access for the key. Default is :const:`KEY_READ`. See ++ :ref:`Access Rights <access-rights>` for other allowed values. + + The result is a new handle to the specified key. + + If the function fails, :exc:`WindowsError` is raised. + + + .. function:: OpenKeyEx() + +- The functionality of :func:`OpenKeyEx` is provided via :func:`OpenKey`, by the +- use of default arguments. ++ The functionality of :func:`OpenKeyEx` is provided via :func:`OpenKey`, ++ by the use of default arguments. + + + .. function:: QueryInfoKey(key) + + Returns information about a key, as a tuple. + +- *key* is an already open key, or one of the predefined :const:`HKEY_\*` +- constants. ++ *key* is an already open key, or one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. + + The result is a tuple of 3 items: + + +-------+---------------------------------------------+ + | Index | Meaning | + +=======+=============================================+ + | ``0`` | An integer giving the number of sub keys | + | | this key has. | + +-------+---------------------------------------------+ + | ``1`` | An integer giving the number of values this | + | | key has. | + +-------+---------------------------------------------+ + | ``2`` | A long integer giving when the key was last | + | | modified (if available) as 100's of | + | | nanoseconds since Jan 1, 1600. | + +-------+---------------------------------------------+ + + + .. function:: QueryValue(key, sub_key) + +- Retrieves the unnamed value for a key, as a string ++ Retrieves the unnamed value for a key, as a string. + +- *key* is an already open key, or one of the predefined :const:`HKEY_\*` +- constants. ++ *key* is an already open key, or one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. + +- *sub_key* is a string that holds the name of the subkey with which the value is +- associated. If this parameter is ``None`` or empty, the function retrieves the +- value set by the :func:`SetValue` method for the key identified by *key*. ++ *sub_key* is a string that holds the name of the subkey with which the value is ++ associated. If this parameter is ``None`` or empty, the function retrieves the ++ value set by the :func:`SetValue` method for the key identified by *key*. + + Values in the registry have name, type, and data components. This method + retrieves the data for a key's first value that has a NULL name. But the + underlying API call doesn't return the type, so always use + :func:`QueryValueEx` if possible. + + + .. function:: QueryValueEx(key, value_name) + +- Retrieves the type and data for a specified value name associated with an open +- registry key. ++ Retrieves the type and data for a specified value name associated with ++ an open registry key. + +- *key* is an already open key, or one of the predefined :const:`HKEY_\*` +- constants. ++ *key* is an already open key, or one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. + + *value_name* is a string indicating the value to query. + + The result is a tuple of 2 items: + + +-------+-----------------------------------------+ + | Index | Meaning | + +=======+=========================================+ + | ``0`` | The value of the registry item. | + +-------+-----------------------------------------+ + | ``1`` | An integer giving the registry type for | +- | | this value. | ++ | | this value (see table in docs for | ++ | | :meth:`SetValueEx`) | + +-------+-----------------------------------------+ + + + .. function:: SaveKey(key, file_name) + + Saves the specified key, and all its subkeys to the specified file. + +- *key* is an already open key, or one of the predefined :const:`HKEY_\*` +- constants. ++ *key* is an already open key, or one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. + +- *file_name* is the name of the file to save registry data to. This file cannot +- already exist. If this filename includes an extension, it cannot be used on file +- allocation table (FAT) file systems by the :meth:`LoadKey`, :meth:`ReplaceKey` +- or :meth:`RestoreKey` methods. ++ *file_name* is the name of the file to save registry data to. This file ++ cannot already exist. If this filename includes an extension, it cannot be ++ used on file allocation table (FAT) file systems by the :meth:`LoadKey` ++ method. + +- If *key* represents a key on a remote computer, the path described by ++ If *key* represents a key on a remote computer, the path described by + *file_name* is relative to the remote computer. The caller of this method must +- possess the :const:`SeBackupPrivilege` security privilege. Note that +- privileges are different than permissions - see the Win32 documentation for +- more details. ++ possess the :const:`SeBackupPrivilege` security privilege. Note that ++ privileges are different than permissions -- see the ++ `Conflicts Between User Rights and Permissions documentation ++ <http://msdn.microsoft.com/en-us/library/ms724878%28v=VS.85%29.aspx>`__ ++ for more details. + + This function passes NULL for *security_attributes* to the API. + + + .. function:: SetValue(key, sub_key, type, value) + + Associates a value with a specified key. + +- *key* is an already open key, or one of the predefined :const:`HKEY_\*` +- constants. ++ *key* is an already open key, or one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. + +- *sub_key* is a string that names the subkey with which the value is associated. ++ *sub_key* is a string that names the subkey with which the value is associated. + + *type* is an integer that specifies the type of the data. Currently this must be + :const:`REG_SZ`, meaning only strings are supported. Use the :func:`SetValueEx` + function for support for other data types. + + *value* is a string that specifies the new value. + + If the key specified by the *sub_key* parameter does not exist, the SetValue + function creates it. + + Value lengths are limited by available memory. Long values (more than 2048 + bytes) should be stored as files with the filenames stored in the configuration + registry. This helps the registry perform efficiently. + +- The key identified by the *key* parameter must have been opened with ++ The key identified by the *key* parameter must have been opened with + :const:`KEY_SET_VALUE` access. + + + .. function:: SetValueEx(key, value_name, reserved, type, value) + + Stores data in the value field of an open registry key. + +- *key* is an already open key, or one of the predefined :const:`HKEY_\*` +- constants. ++ *key* is an already open key, or one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. + +- *value_name* is a string that names the subkey with which the value is ++ *value_name* is a string that names the subkey with which the value is + associated. + +- *type* is an integer that specifies the type of the data. This should be one +- of the following constants defined in this module: ++ *type* is an integer that specifies the type of the data. See ++ :ref:`Value Types <value-types>` for the available types. + +- +----------------------------------+---------------------------------------------+ +- | Constant | Meaning | +- +==================================+=============================================+ +- | :const:`REG_BINARY` | Binary data in any form. | +- +----------------------------------+---------------------------------------------+ +- | :const:`REG_DWORD` | A 32-bit number. | +- +----------------------------------+---------------------------------------------+ +- | :const:`REG_DWORD_LITTLE_ENDIAN` | A 32-bit number in little-endian format. | +- +----------------------------------+---------------------------------------------+ +- | :const:`REG_DWORD_BIG_ENDIAN` | A 32-bit number in big-endian format. | +- +----------------------------------+---------------------------------------------+ +- | :const:`REG_EXPAND_SZ` | Null-terminated string containing | +- | | references to environment variables | +- | | (``%PATH%``). | +- +----------------------------------+---------------------------------------------+ +- | :const:`REG_LINK` | A Unicode symbolic link. | +- +----------------------------------+---------------------------------------------+ +- | :const:`REG_MULTI_SZ` | A sequence of null-terminated strings, | +- | | terminated by two null characters. (Python | +- | | handles this termination automatically.) | +- +----------------------------------+---------------------------------------------+ +- | :const:`REG_NONE` | No defined value type. | +- +----------------------------------+---------------------------------------------+ +- | :const:`REG_RESOURCE_LIST` | A device-driver resource list. | +- +----------------------------------+---------------------------------------------+ +- | :const:`REG_SZ` | A null-terminated string. | +- +----------------------------------+---------------------------------------------+ +- +- *reserved* can be anything - zero is always passed to the API. ++ *reserved* can be anything -- zero is always passed to the API. + + *value* is a string that specifies the new value. + + This method can also set additional value and type information for the specified + key. The key identified by the key parameter must have been opened with + :const:`KEY_SET_VALUE` access. + +- To open the key, use the :func:`CreateKeyEx` or :func:`OpenKey` methods. ++ To open the key, use the :func:`CreateKey` or :func:`OpenKey` methods. + + Value lengths are limited by available memory. Long values (more than 2048 + bytes) should be stored as files with the filenames stored in the configuration + registry. This helps the registry perform efficiently. + + ++.. function:: DisableReflectionKey(key) ++ ++ Disables registry reflection for 32-bit processes running on a 64-bit ++ operating system. ++ ++ *key* is an already open key, or one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. ++ ++ Will generally raise :exc:`NotImplemented` if executed on a 32-bit ++ operating system. ++ ++ If the key is not on the reflection list, the function succeeds but has no ++ effect. Disabling reflection for a key does not affect reflection of any ++ subkeys. ++ ++ ++.. function:: EnableReflectionKey(key) ++ ++ Restores registry reflection for the specified disabled key. ++ ++ *key* is an already open key, or one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. ++ ++ Will generally raise :exc:`NotImplemented` if executed on a 32-bit ++ operating system. ++ ++ Restoring reflection for a key does not affect reflection of any subkeys. ++ ++ ++.. function:: QueryReflectionKey(key) ++ ++ Determines the reflection state for the specified key. ++ ++ *key* is an already open key, or one of the predefined ++ :ref:`HKEY_* constants <hkey-constants>`. ++ ++ Returns ``True`` if reflection is disabled. ++ ++ Will generally raise :exc:`NotImplemented` if executed on a 32-bit ++ operating system. ++ ++ ++.. _constants: ++ ++Constants ++------------------ ++ ++The following constants are defined for use in many :mod:`_winreg` functions. ++ ++.. _hkey-constants: ++ ++HKEY_* Constants ++++++++++++++++++ ++ ++.. data:: HKEY_CLASSES_ROOT ++ ++ Registry entries subordinate to this key define types (or classes) of ++ documents and the properties associated with those types. Shell and ++ COM applications use the information stored under this key. ++ ++ ++.. data:: HKEY_CURRENT_USER ++ ++ Registry entries subordinate to this key define the preferences of ++ the current user. These preferences include the settings of ++ environment variables, data about program groups, colors, printers, ++ network connections, and application preferences. ++ ++.. data:: HKEY_LOCAL_MACHINE ++ ++ Registry entries subordinate to this key define the physical state ++ of the computer, including data about the bus type, system memory, ++ and installed hardware and software. ++ ++.. data:: HKEY_USERS ++ ++ Registry entries subordinate to this key define the default user ++ configuration for new users on the local computer and the user ++ configuration for the current user. ++ ++.. data:: HKEY_PERFORMANCE_DATA ++ ++ Registry entries subordinate to this key allow you to access ++ performance data. The data is not actually stored in the registry; ++ the registry functions cause the system to collect the data from ++ its source. ++ ++ ++.. data:: HKEY_CURRENT_CONFIG ++ ++ Contains information about the current hardware profile of the ++ local computer system. ++ ++.. data:: HKEY_DYN_DATA ++ ++ This key is not used in versions of Windows after 98. ++ ++ ++.. _access-rights: ++ ++Access Rights +++++++++++++++ ++ ++For more information, see `Registry Key Security and Access ++<http://msdn.microsoft.com/en-us/library/ms724878%28v=VS.85%29.aspx>`__. ++ ++.. data:: KEY_ALL_ACCESS ++ ++ Combines the STANDARD_RIGHTS_REQUIRED, :const:`KEY_QUERY_VALUE`, ++ :const:`KEY_SET_VALUE`, :const:`KEY_CREATE_SUB_KEY`, ++ :const:`KEY_ENUMERATE_SUB_KEYS`, :const:`KEY_NOTIFY`, ++ and :const:`KEY_CREATE_LINK` access rights. ++ ++.. data:: KEY_WRITE ++ ++ Combines the STANDARD_RIGHTS_WRITE, :const:`KEY_SET_VALUE`, and ++ :const:`KEY_CREATE_SUB_KEY` access rights. ++ ++.. data:: KEY_READ ++ ++ Combines the STANDARD_RIGHTS_READ, :const:`KEY_QUERY_VALUE`, ++ :const:`KEY_ENUMERATE_SUB_KEYS`, and :const:`KEY_NOTIFY` values. ++ ++.. data:: KEY_EXECUTE ++ ++ Equivalent to :const:`KEY_READ`. ++ ++.. data:: KEY_QUERY_VALUE ++ ++ Required to query the values of a registry key. ++ ++.. data:: KEY_SET_VALUE ++ ++ Required to create, delete, or set a registry value. ++ ++.. data:: KEY_CREATE_SUB_KEY ++ ++ Required to create a subkey of a registry key. ++ ++.. data:: KEY_ENUMERATE_SUB_KEYS ++ ++ Required to enumerate the subkeys of a registry key. ++ ++.. data:: KEY_NOTIFY ++ ++ Required to request change notifications for a registry key or for ++ subkeys of a registry key. ++ ++.. data:: KEY_CREATE_LINK ++ ++ Reserved for system use. ++ ++ ++.. _64-bit-access-rights: ++ ++64-bit Specific ++*************** ++ ++For more information, see `Accesing an Alternate Registry View ++<http://msdn.microsoft.com/en-us/library/aa384129(v=VS.85).aspx>`__. ++ ++.. data:: KEY_WOW64_64KEY ++ ++ Indicates that an application on 64-bit Windows should operate on ++ the 64-bit registry view. ++ ++.. data:: KEY_WOW64_32KEY ++ ++ Indicates that an application on 64-bit Windows should operate on ++ the 32-bit registry view. ++ ++ ++.. _value-types: ++ ++Value Types +++++++++++++ ++ ++For more information, see `Registry Value Types ++<http://msdn.microsoft.com/en-us/library/ms724884%28v=VS.85%29.aspx>`__. ++ ++.. data:: REG_BINARY ++ ++ Binary data in any form. ++ ++.. data:: REG_DWORD ++ ++ 32-bit number. ++ ++.. data:: REG_DWORD_LITTLE_ENDIAN ++ ++ A 32-bit number in little-endian format. ++ ++.. data:: REG_DWORD_BIG_ENDIAN ++ ++ A 32-bit number in big-endian format. ++ ++.. data:: REG_EXPAND_SZ ++ ++ Null-terminated string containing references to environment ++ variables (``%PATH%``). ++ ++.. data:: REG_LINK ++ ++ A Unicode symbolic link. ++ ++.. data:: REG_MULTI_SZ ++ ++ A sequence of null-terminated strings, terminated by two null characters. ++ (Python handles this termination automatically.) ++ ++.. data:: REG_NONE ++ ++ No defined value type. ++ ++.. data:: REG_RESOURCE_LIST ++ ++ A device-driver resource list. ++ ++.. data:: REG_FULL_RESOURCE_DESCRIPTOR ++ ++ A hardware setting. ++ ++.. data:: REG_RESOURCE_REQUIREMENTS_LIST ++ ++ A hardware resource list. ++ ++.. data:: REG_SZ ++ ++ A null-terminated string. ++ ++ + .. _handle-object: + + Registry Handle Objects + ----------------------- + + This object wraps a Windows HKEY object, automatically closing it when the + object is destroyed. To guarantee cleanup, you can call either the +-:meth:`Close` method on the object, or the :func:`CloseKey` function. ++:meth:`~PyHKEY.Close` method on the object, or the :func:`CloseKey` function. + + All registry functions in this module return one of these objects. + +-All registry functions in this module which accept a handle object also accept +-an integer, however, use of the handle object is encouraged. ++All registry functions in this module which accept a handle object also accept ++an integer, however, use of the handle object is encouraged. + +-Handle objects provide semantics for :meth:`__nonzero__` - thus :: ++Handle objects provide semantics for :meth:`__nonzero__` -- thus:: + + if handle: + print "Yes" + + will print ``Yes`` if the handle is currently valid (has not been closed or + detached). + + The object also support comparison semantics, so handle objects will compare + true if they both reference the same underlying Windows handle value. + +-Handle objects can be converted to an integer (e.g., using the builtin ++Handle objects can be converted to an integer (e.g., using the built-in + :func:`int` function), in which case the underlying Windows handle value is +-returned. You can also use the :meth:`Detach` method to return the integer +-handle, and also disconnect the Windows handle from the handle object. ++returned. You can also use the :meth:`~PyHKEY.Detach` method to return the ++integer handle, and also disconnect the Windows handle from the handle object. + + + .. method:: PyHKEY.Close() + + Closes the underlying Windows handle. + + If the handle is already closed, no error is raised. + + + .. method:: PyHKEY.Detach() + + Detaches the Windows handle from the handle object. + + The result is an integer (or long on 64 bit Windows) that holds the value of the + handle before it is detached. If the handle is already detached or closed, this + will return zero. + + After calling this function, the handle is effectively invalidated, but the +- handle is not closed. You would call this function when you need the +- underlying Win32 handle to exist beyond the lifetime of the handle object. ++ handle is not closed. You would call this function when you need the ++ underlying Win32 handle to exist beyond the lifetime of the handle object. + + .. method:: PyHKEY.__enter__() + PyHKEY.__exit__(\*exc_info) + +- The HKEY object implements :meth:`__enter__` and :meth:`__exit__` and thus +- supports the context protocol for the :keyword:`with` statement:: ++ The HKEY object implements :meth:`~object.__enter__` and ++ :meth:`~object.__exit__` and thus supports the context protocol for the ++ :keyword:`with` statement:: + + with OpenKey(HKEY_LOCAL_MACHINE, "foo") as key: +- # ... work with key ... ++ ... # work with key + + will automatically close *key* when control leaves the :keyword:`with` block. + + .. versionadded:: 2.6 + ======================================= --- /dev/null +++ /library/diff/_winreg.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,540 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to60__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/_winreg.rst => r266/library/_winreg.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to60__0"></td><td class="diff_header" id="from60_10">10</td><td nowrap="nowrap"> The :mod:`_winreg` module has been renamed to :mod:`winreg` in Python 3.0.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_11">11</td><td nowrap="nowrap"> The :term:`2to3` tool will automatically adapt imports when converting your</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_12">12</td><td nowrap="nowrap"> sources to 3.0.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_13">13</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_14">14</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_15">15</td><td nowrap="nowrap">.. versionadded:: 2.0</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_16">16</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_17">17</td><td nowrap="nowrap">These functions expose the Windows registry API to Python. Instead of using an</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__1">n</a></td><td class="diff_header" id="from60_18">18-</td><td nowrap="nowrap"><span class="diff_sub">integer as the registry handle, a handle object is used to ensure that the</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__1">n</a></td><td class="diff_header" id="to60_18">18+</td><td nowrap="nowrap"><span class="diff_add">integer as the registry handle, a :ref:`handle object <handle-object>` is used</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_19">19-</td><td nowrap="nowrap">handles are closed correctly, even if the programmer neglects<span class="diff_sub"> to explicitly</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_19">19+</td><td nowrap="nowrap"><span class="diff_add">to ensure that the </span>handles are closed correctly, even if the programmer neglects</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_20">20-</td><td nowrap="nowrap"><span class="diff_sub">close them.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_20">20+</td><td nowrap="nowrap"><span class="diff_add">to explicitly close them.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_21">21-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_22">22-</td><td nowrap="nowrap"><span class="diff_sub">This module exposes a very low-level interface to the Windows registry; it is</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__1"></td><td class="diff_header" id="from60_23">23-</td><td nowrap="nowrap"><span class="diff_sub">expected that in the future a new ``winreg`` module will be created offering a</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_24">24-</td><td nowrap="nowrap"><span class="diff_sub">higher-level interface to the registry API.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_25">25</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__2"></td><td class="diff_header" id="from60_26">26</td><td nowrap="nowrap">This module offers the following functions:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_27">27</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_28">28</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_29">29</td><td nowrap="nowrap">.. function:: CloseKey(hkey)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_30">30</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__2">n</a></td><td class="diff_header" id="from60_31">31-</td><td nowrap="nowrap"> Closes a previously opened registry key. The hkey argument specifies a</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__2">n</a></td><td class="diff_header" id="to60_27">27+</td><td nowrap="nowrap"> Closes a previously opened registry key. <span class="diff_add"> </span>The <span class="diff_add">*</span>hkey<span class="diff_add">*</span> argument specifies a</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_32">32</td><td nowrap="nowrap"> previously opened key.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_33">33</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next" id="difflib_chg_to60__3"><a href="#difflib_chg_to60__3">n</a></td><td class="diff_header" id="from60_34">34-</td><td nowrap="nowrap"><span class="diff_sub"> Note that if *hkey* is not closed using this method (or via</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__3"><a href="#difflib_chg_to60__3">n</a></td><td class="diff_header" id="to60_30">30+</td><td nowrap="nowrap"><span class="diff_add"> .. note::</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_31">31+</td><td nowrap="nowrap"><span class="diff_add"> If *hkey* is not closed using this method (or via :meth:`hkey.Close() <PyHKEY.Close>`),</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_35">35-</td><td nowrap="nowrap"> <span class="diff_chg">:meth:`handle.Close`),</span> it is closed when the *hkey* object is destroyed by</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_32">32+</td><td nowrap="nowrap"> <span class="diff_chg"> </span> it is closed when the *hkey* object is destroyed by<span class="diff_add"> Python.</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__4"></td><td class="diff_header" id="from60_36">36-</td><td nowrap="nowrap"><span class="diff_sub"> Python.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_37">37</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_38">38</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_39">39</td><td nowrap="nowrap">.. function:: ConnectRegistry(computer_name, key)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_40">40</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__4">n</a></td><td class="diff_header" id="from60_41">41-</td><td nowrap="nowrap"> Establishes a connection to a predefined registry handle on<span class="diff_sub"> </span> another computer,</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__4">n</a></td><td class="diff_header" id="to60_37">37+</td><td nowrap="nowrap"> Establishes a connection to a predefined registry handle on another computer,</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__5"></td><td class="diff_header" id="from60_42">42-</td><td nowrap="nowrap"> and returns a :<span class="diff_chg">d</span>f<span class="diff_sub">n</span>:`handle object`</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__5"></td><td class="diff_header" id="to60_38">38+</td><td nowrap="nowrap"> and returns a :<span class="diff_chg">re</span>f:`handle object<span class="diff_add"> <handle-object></span>`<span class="diff_add">.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_43">43</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__5">n</a></td><td class="diff_header" id="from60_44">44-</td><td nowrap="nowrap"> *computer_name* is the name of the remote computer, of the<span class="diff_sub"> </span> form</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__5">n</a></td><td class="diff_header" id="to60_40">40+</td><td nowrap="nowrap"> *computer_name* is the name of the remote computer, of the form</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_45">45</td><td nowrap="nowrap"> ``r"\\computername"``. If ``None``, the local computer is used.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_46">46</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__6"></td><td class="diff_header" id="from60_47">47</td><td nowrap="nowrap"> *key* is the predefined handle to connect to.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_48">48</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_49">49</td><td nowrap="nowrap"> The return value is the handle of the opened key. If the function fails, a</td></tr><tr><td class="diff_next" id="difflib_chg_to60__7"><a href="#difflib_chg_to60__6">n</a></td><td class="diff_header" id="from60_50">50-</td><td nowrap="nowrap"> :exc:`WindowsError` exception is<span class="diff_sub"> </span> raised.</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__7"><a href="#difflib_chg_to60__6">n</a></td><td class="diff_header" id="to60_46">46+</td><td nowrap="nowrap"> :exc:`WindowsError` exception is raised.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_51">51</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_52">52</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__8"></td><td class="diff_header" id="from60_53">53</td><td nowrap="nowrap">.. function:: CreateKey(key, sub_key)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_54">54</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next" id="difflib_chg_to60__9"><a href="#difflib_chg_to60__7">n</a></td><td class="diff_header" id="from60_55">55-</td><td nowrap="nowrap"> Creates or opens the specified key, returning a<span class="diff_sub"> :dfn:`handle object`</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__9"><a href="#difflib_chg_to60__7">n</a></td><td class="diff_header" id="to60_51">51+</td><td nowrap="nowrap"> Creates or opens the specified key, returning a</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_52">52+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`handle object <handle-object>`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_56">56</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__8">n</a></td><td class="diff_header" id="from60_57">57-</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined<span class="diff_sub"> :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__8">n</a></td><td class="diff_header" id="to60_54">54+</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_58">58-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_55">55+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_59">59</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next" id="difflib_chg_to60__10"><a href="#difflib_chg_to60__9">n</a></td><td class="diff_header" id="from60_60">60-</td><td nowrap="nowrap"> *sub_key* is a string that names the key this method opens <span class="diff_sub"> </span>or creates.</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__10"><a href="#difflib_chg_to60__9">n</a></td><td class="diff_header" id="to60_57">57+</td><td nowrap="nowrap"> *sub_key* is a string that names the key this method opens or creates.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_61">61</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__10">n</a></td><td class="diff_header" id="from60_62">62-</td><td nowrap="nowrap"> If *key* is one of the predefined keys, *sub_key* may <span class="diff_sub"> </span>be ``None``. In that</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__10">n</a></td><td class="diff_header" id="to60_59">59+</td><td nowrap="nowrap"> If *key* is one of the predefined keys, *sub_key* may be ``None``. In that</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_63">63-</td><td nowrap="nowrap"> case, the handle returned is the same key handle <span class="diff_sub"> </span>passed in to the function.</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_60">60+</td><td nowrap="nowrap"> case, the handle returned is the same key handle passed in to the function.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_64">64</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_65">65</td><td nowrap="nowrap"> If the key already exists, this function opens the existing key.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_66">66</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__11"></td><td class="diff_header" id="from60_67">67</td><td nowrap="nowrap"> The return value is the handle of the opened key. If the function fails, a</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__11">n</a></td><td class="diff_header" id="from60_68">68-</td><td nowrap="nowrap"> :exc:`WindowsError` exception is<span class="diff_sub"> </span> raised.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__11">n</a></td><td class="diff_header" id="to60_65">65+</td><td nowrap="nowrap"> :exc:`WindowsError` exception is raised.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_69">69</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_70">70</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_71">71</td><td nowrap="nowrap">.. function:: DeleteKey(key, sub_key)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_72">72</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_73">73</td><td nowrap="nowrap"> Deletes the specified key.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_74">74</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__12">n</a></td><td class="diff_header" id="from60_75">75-</td><td nowrap="nowrap"> *key* is an already open key, or any one of the predefined<span class="diff_sub"> :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__12">n</a></td><td class="diff_header" id="to60_72">72+</td><td nowrap="nowrap"> *key* is an already open key, or any one of the predefined</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__12"></td><td class="diff_header" id="from60_76">76-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__12"></td><td class="diff_header" id="to60_73">73+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_77">77</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_78">78</td><td nowrap="nowrap"> *sub_key* is a string that must be a subkey of the key identified by the *key*</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_79">79</td><td nowrap="nowrap"> parameter. This value must not be ``None``, and the key may not have subkeys.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_80">80</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_81">81</td><td nowrap="nowrap"> *This method can not delete keys with subkeys.*</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_82">82</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__13"></td><td class="diff_header" id="from60_83">83</td><td nowrap="nowrap"> If the method succeeds, the entire key, including all of its values, is removed.</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__13">n</a></td><td class="diff_header" id="from60_84">84-</td><td nowrap="nowrap"> If the method fails, a :exc:`WindowsError` <span class="diff_sub"> </span>exception is raised.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__13">n</a></td><td class="diff_header" id="to60_81">81+</td><td nowrap="nowrap"> If the method fails, a :exc:`WindowsError` exception is raised.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_85">85</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_86">86</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_87">87</td><td nowrap="nowrap">.. function:: DeleteValue(key, value)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_88">88</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_89">89</td><td nowrap="nowrap"> Removes a named value from a registry key.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_90">90</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__14">n</a></td><td class="diff_header" id="from60_91">91-</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined<span class="diff_sub"> :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__14">n</a></td><td class="diff_header" id="to60_88">88+</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_92">92-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_89">89+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> + <tr><td class="diff_next" id="difflib_chg_to60__14"></td><td class="diff_header" id="from60_93">93</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_94">94</td><td nowrap="nowrap"> *value* is a string that identifies the value to remove.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_95">95</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__15"></td><td class="diff_header" id="from60_96">96</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_97">97</td><td nowrap="nowrap">.. function:: EnumKey(key, index)</td></tr> <tr><td class="diff_next" id="difflib_chg_to60__16"></td><td class="diff_header" id="from60_98">98</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_99">99</td><td nowrap="nowrap"> Enumerates subkeys of an open registry key, returning a string.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_100">100</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__15">n</a></td><td class="diff_header" id="from60_101">101-</td><td nowrap="nowrap"> *key* is an already open key, or any one of the predefined<span class="diff_sub"> :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__15">n</a></td><td class="diff_header" id="to60_98">98+</td><td nowrap="nowrap"> *key* is an already open key, or any one of the predefined</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_102">102-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_99">99+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_103">103</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__16">n</a></td><td class="diff_header" id="from60_104">104-</td><td nowrap="nowrap"> *index* is an integer that identifies the index of the key to<span class="diff_sub"> </span> retrieve.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__16">n</a></td><td class="diff_header" id="to60_101">101+</td><td nowrap="nowrap"> *index* is an integer that identifies the index of the key to retrieve.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_105">105</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__17">n</a></td><td class="diff_header" id="from60_106">106-</td><td nowrap="nowrap"> The function retrieves the name of one subkey each time it <span class="diff_sub"> </span>is called. It is</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__17">n</a></td><td class="diff_header" id="to60_103">103+</td><td nowrap="nowrap"> The function retrieves the name of one subkey each time it is called. It is</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__17"></td><td class="diff_header" id="from60_107">107-</td><td nowrap="nowrap"> typically called repeatedly until a<span class="diff_sub"> </span> :exc:`WindowsError` exception <span class="diff_sub"> </span>is</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__17"></td><td class="diff_header" id="to60_104">104+</td><td nowrap="nowrap"> typically called repeatedly until a :exc:`WindowsError` exception is</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_108">108</td><td nowrap="nowrap"> raised, indicating, no more values are available.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_109">109</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__18"></td><td class="diff_header" id="from60_110">110</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_111">111</td><td nowrap="nowrap">.. function:: EnumValue(key, index)</td></tr> <tr><td class="diff_next" id="difflib_chg_to60__19"></td><td class="diff_header" id="from60_112">112</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_113">113</td><td nowrap="nowrap"> Enumerates values of an open registry key, returning a tuple.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_114">114</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__18">n</a></td><td class="diff_header" id="from60_115">115-</td><td nowrap="nowrap"> *key* is an already open key, or any one of the predefined<span class="diff_sub"> :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__18">n</a></td><td class="diff_header" id="to60_112">112+</td><td nowrap="nowrap"> *key* is an already open key, or any one of the predefined</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_116">116-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_113">113+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_117">117</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__19">n</a></td><td class="diff_header" id="from60_118">118-</td><td nowrap="nowrap"> *index* is an integer that identifies the index of the value <span class="diff_sub"> </span>to retrieve.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__19">n</a></td><td class="diff_header" id="to60_115">115+</td><td nowrap="nowrap"> *index* is an integer that identifies the index of the value to retrieve.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_119">119</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__20">n</a></td><td class="diff_header" id="from60_120">120-</td><td nowrap="nowrap"> The function retrieves the name of one subkey each time it is<span class="diff_sub"> </span> called. It is</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__20">n</a></td><td class="diff_header" id="to60_117">117+</td><td nowrap="nowrap"> The function retrieves the name of one subkey each time it is called. It is</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_121">121-</td><td nowrap="nowrap"> typically called repeatedly, until a<span class="diff_sub"> </span> :exc:`WindowsError` exception is</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_118">118+</td><td nowrap="nowrap"> typically called repeatedly, until a :exc:`WindowsError` exception is</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_122">122-</td><td nowrap="nowrap"> raised, indicating <span class="diff_sub"> </span>no more values.</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_119">119+</td><td nowrap="nowrap"> raised, indicating no more values.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_123">123</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_124">124</td><td nowrap="nowrap"> The result is a tuple of 3 items:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_125">125</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_126">126</td><td nowrap="nowrap"> +-------+--------------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_127">127</td><td nowrap="nowrap"> | Index | Meaning | </td></tr> <tr><td class="diff_next" id="difflib_chg_to60__20"></td><td class="diff_header" id="from60_128">128</td><td nowrap="nowrap"> +=======+============================================+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_129">129</td><td nowrap="nowrap"> | ``0`` | A string that identifies the value name | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_130">130</td><td nowrap="nowrap"> +-------+--------------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_131">131</td><td nowrap="nowrap"> | ``1`` | An object that holds the value data, and | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_132">132</td><td nowrap="nowrap"> | | whose type depends on the underlying | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_133">133</td><td nowrap="nowrap"> | | registry type | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_134">134</td><td nowrap="nowrap"> +-------+--------------------------------------------+</td></tr> <tr><td class="diff_next" id="difflib_chg_to60__21"></td><td class="diff_header" id="from60_135">135</td><td nowrap="nowrap"> | ``2`` | An integer that identifies the type of the | </td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__21">n</a></td><td class="diff_header" id="from60_136">136-</td><td nowrap="nowrap"><span class="diff_sub"> | | value data | </span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__21">n</a></td><td class="diff_header" id="to60_133">133+</td><td nowrap="nowrap"><span class="diff_add"> | | value data (see table in docs for | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_134">134+</td><td nowrap="nowrap"><span class="diff_add"> | | :meth:`SetValueEx`) | </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_137">137</td><td nowrap="nowrap"> +-------+--------------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_138">138</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_139">139</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_140">140</td><td nowrap="nowrap">.. function:: ExpandEnvironmentStrings(unicode)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_141">141</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__22">n</a></td><td class="diff_header" id="from60_142">142-</td><td nowrap="nowrap"><span class="diff_sub"> Expands environment strings %NAME% in unicode string like const:`REG_EXPAND_SZ`::</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__22">n</a></td><td class="diff_header" id="to60_140">140+</td><td nowrap="nowrap"><span class="diff_add"> Expands environment variable placeholders ``%NAME%`` in unicode strings like</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_141">141+</td><td nowrap="nowrap"><span class="diff_add"> :const:`REG_EXPAND_SZ`::</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_143">143</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_144">144</td><td nowrap="nowrap"> >>> ExpandEnvironmentStrings(u"%windir%")</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_145">145</td><td nowrap="nowrap"> u"C:\\Windows"</td></tr> <tr><td class="diff_next" id="difflib_chg_to60__22"></td><td class="diff_header" id="from60_146">146</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_147">147</td><td nowrap="nowrap"> .. versionadded:: 2.6</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_148">148</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_149">149</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__23"></td><td class="diff_header" id="from60_150">150</td><td nowrap="nowrap">.. function:: FlushKey(key)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_151">151</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_152">152</td><td nowrap="nowrap"> Writes all the attributes of a key to the registry.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_153">153</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next" id="difflib_chg_to60__24"><a href="#difflib_chg_to60__23">n</a></td><td class="diff_header" id="from60_154">154-</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined<span class="diff_sub"> :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__24"><a href="#difflib_chg_to60__23">n</a></td><td class="diff_header" id="to60_153">153+</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_155">155-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_154">154+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_156">156</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_157">157</td><td nowrap="nowrap"> It is not necessary to call :func:`FlushKey` to change a key. Registry changes are</td></tr><tr><td class="diff_next" id="difflib_chg_to60__25"><a href="#difflib_chg_to60__24">n</a></td><td class="diff_header" id="from60_158">158-</td><td nowrap="nowrap"> flushed to disk by the registry using its lazy<span class="diff_sub"> </span> flusher. Registry changes are</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__25"><a href="#difflib_chg_to60__24">n</a></td><td class="diff_header" id="to60_157">157+</td><td nowrap="nowrap"> flushed to disk by the registry using its lazy flusher. Registry changes are</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_159">159-</td><td nowrap="nowrap"> also flushed to disk at system<span class="diff_sub"> </span> shutdown. Unlike :func:`CloseKey`, the</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_158">158+</td><td nowrap="nowrap"> also flushed to disk at system shutdown. Unlike :func:`CloseKey`, the</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_160">160-</td><td nowrap="nowrap"> :func:`FlushKey` method<span class="diff_sub"> </span> returns only when all the data has been written to the</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_159">159+</td><td nowrap="nowrap"> :func:`FlushKey` method returns only when all the data has been written to the</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_161">161</td><td nowrap="nowrap"> registry. An application should only call :func:`FlushKey` if it requires</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__25">n</a></td><td class="diff_header" id="from60_162">162-</td><td nowrap="nowrap"> absolute<span class="diff_sub"> </span> certainty that registry changes are on disk.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__25">n</a></td><td class="diff_header" id="to60_161">161+</td><td nowrap="nowrap"> absolute certainty that registry changes are on disk.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_163">163</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__26"></td><td class="diff_header" id="from60_164">164</td><td nowrap="nowrap"> .. note::</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_165">165</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__26">n</a></td><td class="diff_header" id="from60_166">166-</td><td nowrap="nowrap"> If you don't know whether a :func:`FlushKey` call is required, it<span class="diff_sub"> </span> probably</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__26">n</a></td><td class="diff_header" id="to60_165">165+</td><td nowrap="nowrap"> If you don't know whether a :func:`FlushKey` call is required, it probably</td></tr> + <tr><td class="diff_next" id="difflib_chg_to60__27"></td><td class="diff_header" id="from60_167">167</td><td nowrap="nowrap"> isn't.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_168">168</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_169">169</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__28"></td><td class="diff_header" id="from60_170">170</td><td nowrap="nowrap">.. function:: LoadKey(key, sub_key, file_name)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_171">171</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__27">n</a></td><td class="diff_header" id="from60_172">172-</td><td nowrap="nowrap"> Creates a subkey under the specified key and stores registration <span class="diff_sub"> </span>information</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__27">n</a></td><td class="diff_header" id="to60_171">171+</td><td nowrap="nowrap"> Creates a subkey under the specified key and stores registration information</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_173">173</td><td nowrap="nowrap"> from a specified file into that subkey.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_174">174</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__28">n</a></td><td class="diff_header" id="from60_175">175-</td><td nowrap="nowrap"><span class="diff_sub"> *key* is an already open key, or any of the predefined :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__28">n</a></td><td class="diff_header" id="to60_174">174+</td><td nowrap="nowrap"><span class="diff_add"> *key* is a handle returned by :func:`ConnectRegistry` or one of the constants</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__29"></td><td class="diff_header" id="from60_176">176-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__29"></td><td class="diff_header" id="to60_175">175+</td><td nowrap="nowrap"><span class="diff_add"> :const:`HKEY_USERS` or :const:`HKEY_LOCAL_MACHINE`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_177">177</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__29">n</a></td><td class="diff_header" id="from60_178">178-</td><td nowrap="nowrap"> *sub_key* is a string that identifies the sub<span class="diff_sub">_</span>key to load.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__29">n</a></td><td class="diff_header" id="to60_177">177+</td><td nowrap="nowrap"> *sub_key* is a string that identifies the subkey to load.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_179">179</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_180">180</td><td nowrap="nowrap"> *file_name* is the name of the file to load registry data from. This file must</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_181">181</td><td nowrap="nowrap"> have been created with the :func:`SaveKey` function. Under the file allocation</td></tr> <tr><td class="diff_next" id="difflib_chg_to60__30"></td><td class="diff_header" id="from60_182">182</td><td nowrap="nowrap"> table (FAT) file system, the filename may not have an extension.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_183">183</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__30">n</a></td><td class="diff_header" id="from60_184">184-</td><td nowrap="nowrap"> A call to LoadKey<span class="diff_chg">()</span> fails if the calling process does not have the</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__30">n</a></td><td class="diff_header" id="to60_183">183+</td><td nowrap="nowrap"> A call to <span class="diff_add">:func:`</span>LoadKey<span class="diff_chg">`</span> fails if the calling process does not have the</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__31"></td><td class="diff_header" id="from60_185">185-</td><td nowrap="nowrap"> :const:`SE_RESTORE_PRIVILEGE` privilege. Note that privileges are different<span class="diff_sub"> than</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__31"></td><td class="diff_header" id="to60_184">184+</td><td nowrap="nowrap"> :const:`SE_RESTORE_PRIVILEGE` privilege. <span class="diff_add"> </span>Note that privileges are different</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_186">186-</td><td nowrap="nowrap"><span class="diff_sub"> permissions - see the Win32 documentation for more details.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_185">185+</td><td nowrap="nowrap"><span class="diff_add"> from permissions -- see the `RegLoadKey documentation</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_186">186+</td><td nowrap="nowrap"><span class="diff_add"> <http://msdn.microsoft.com/en-us/library/ms724889%28v=VS.85%29.aspx>`_ for</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__32"></td><td class="diff_header" id="to60_187">187+</td><td nowrap="nowrap"><span class="diff_add"> more details.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_187">187</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__31">n</a></td><td class="diff_header" id="from60_188">188-</td><td nowrap="nowrap"> If *key* is a handle returned by :func:`ConnectRegistry`, <span class="diff_sub"> </span>then the path</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__31">n</a></td><td class="diff_header" id="to60_189">189+</td><td nowrap="nowrap"> If *key* is a handle returned by :func:`ConnectRegistry`, then the path</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__33"></td><td class="diff_header" id="from60_189">189-</td><td nowrap="nowrap"> specified in *file<span class="diff_chg">N</span>ame* is relative to the<span class="diff_sub"> </span> remote computer.</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__33"></td><td class="diff_header" id="to60_190">190+</td><td nowrap="nowrap"> specified in *file<span class="diff_chg">_n</span>ame* is relative to the remote computer.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_190">190</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next" id="difflib_chg_to60__34"><a href="#difflib_chg_to60__32">n</a></td><td class="diff_header" id="from60_191">191-</td><td nowrap="nowrap"><span class="diff_sub"> The Win32 documentation implies *key* must be in the :const:`HKEY_USER` or</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_192">192-</td><td nowrap="nowrap"><span class="diff_sub"> :const:`HKEY_LOCAL_MACHINE` tree. This may or may not be true.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_193">193</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__33">n</a></td><td class="diff_header" id="from60_194">194-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_195">195-</td><td nowrap="nowrap">.. function:: OpenKey(key, sub_key[, res<span class="diff_sub">=0]</span>[, sam<span class="diff_chg">=KEY_READ</span>])</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_193">193+</td><td nowrap="nowrap">.. function:: OpenKey(key, sub_key[, res[, sam<span class="diff_chg">]</span>])</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_196">196</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__34">n</a></td><td class="diff_header" id="from60_197">197-</td><td nowrap="nowrap"> Opens the specified key, returning a :<span class="diff_chg">d</span>f<span class="diff_sub">n</span>:`handle object`</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__34">n</a></td><td class="diff_header" id="to60_195">195+</td><td nowrap="nowrap"> Opens the specified key, returning a :<span class="diff_chg">re</span>f:`handle object<span class="diff_add"> <handle-object></span>`<span class="diff_add">.</span></td></tr> + <tr><td class="diff_next" id="difflib_chg_to60__35"></td><td class="diff_header" id="from60_198">198</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__35">n</a></td><td class="diff_header" id="from60_199">199-</td><td nowrap="nowrap"> *key* is an already open key, or any one of the predefined<span class="diff_sub"> :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__35">n</a></td><td class="diff_header" id="to60_197">197+</td><td nowrap="nowrap"> *key* is an already open key, or any one of the predefined</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_200">200-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_198">198+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_201">201</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_202">202</td><td nowrap="nowrap"> *sub_key* is a string that identifies the sub_key to open.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_203">203</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_204">204</td><td nowrap="nowrap"> *res* is a reserved integer, and must be zero. The default is zero.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_205">205</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__36">n</a></td><td class="diff_header" id="from60_206">206-</td><td nowrap="nowrap"> *sam* is an integer that specifies an access mask that describes <span class="diff_sub"> </span>the desired</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__36">n</a></td><td class="diff_header" id="to60_204">204+</td><td nowrap="nowrap"> *sam* is an integer that specifies an access mask that describes the desired</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_207">207-</td><td nowrap="nowrap"> security access for the key. Default is :const:`KEY_READ`</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_205">205+</td><td nowrap="nowrap"> security access for the key. Default is :const:`KEY_READ`<span class="diff_add">. See</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_206">206+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`Access Rights <access-rights>` for other allowed values.</span></td></tr> + <tr><td class="diff_next" id="difflib_chg_to60__36"></td><td class="diff_header" id="from60_208">208</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_209">209</td><td nowrap="nowrap"> The result is a new handle to the specified key.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_210">210</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_211">211</td><td nowrap="nowrap"> If the function fails, :exc:`WindowsError` is raised.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_212">212</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_213">213</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_214">214</td><td nowrap="nowrap">.. function:: OpenKeyEx()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_215">215</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next" id="difflib_chg_to60__37"><a href="#difflib_chg_to60__37">n</a></td><td class="diff_header" id="from60_216">216-</td><td nowrap="nowrap"> The functionality of :func:`OpenKeyEx` is provided via :func:`OpenKey`,<span class="diff_sub"> by the</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__37"><a href="#difflib_chg_to60__37">n</a></td><td class="diff_header" id="to60_215">215+</td><td nowrap="nowrap"> The functionality of :func:`OpenKeyEx` is provided via :func:`OpenKey`,</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_217">217-</td><td nowrap="nowrap"> use of default arguments.</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_216">216+</td><td nowrap="nowrap"> <span class="diff_add"> by the</span> use of default arguments.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_218">218</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_219">219</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_220">220</td><td nowrap="nowrap">.. function:: QueryInfoKey(key)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_221">221</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_222">222</td><td nowrap="nowrap"> Returns information about a key, as a tuple.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_223">223</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__38">n</a></td><td class="diff_header" id="from60_224">224-</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined<span class="diff_sub"> :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__38">n</a></td><td class="diff_header" id="to60_223">223+</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_225">225-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_224">224+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_226">226</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_227">227</td><td nowrap="nowrap"> The result is a tuple of 3 items:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_228">228</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_229">229</td><td nowrap="nowrap"> +-------+---------------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_230">230</td><td nowrap="nowrap"> | Index | Meaning | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_231">231</td><td nowrap="nowrap"> +=======+=============================================+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_232">232</td><td nowrap="nowrap"> | ``0`` | An integer giving the number of sub keys | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_233">233</td><td nowrap="nowrap"> | | this key has. | </td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to60__38"></td><td class="diff_header" id="from60_238">238</td><td nowrap="nowrap"> | ``2`` | A long integer giving when the key was last | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_239">239</td><td nowrap="nowrap"> | | modified (if available) as 100's of | </td></tr> <tr><td class="diff_next" id="difflib_chg_to60__39"></td><td class="diff_header" id="from60_240">240</td><td nowrap="nowrap"> | | nanoseconds since Jan 1, 1600. | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_241">241</td><td nowrap="nowrap"> +-------+---------------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_242">242</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__40"></td><td class="diff_header" id="from60_243">243</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_244">244</td><td nowrap="nowrap">.. function:: QueryValue(key, sub_key)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_245">245</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__39">n</a></td><td class="diff_header" id="from60_246">246-</td><td nowrap="nowrap"> Retrieves the unnamed value for a key, as a string</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__39">n</a></td><td class="diff_header" id="to60_245">245+</td><td nowrap="nowrap"> Retrieves the unnamed value for a key, as a string<span class="diff_add">.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_247">247</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__40">n</a></td><td class="diff_header" id="from60_248">248-</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined<span class="diff_sub"> :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__40">n</a></td><td class="diff_header" id="to60_247">247+</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_249">249-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_248">248+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_250">250</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__41">n</a></td><td class="diff_header" id="from60_251">251-</td><td nowrap="nowrap"> *sub_key* is a string that holds the name of the subkey with which <span class="diff_sub"> </span>the value is</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__41">n</a></td><td class="diff_header" id="to60_250">250+</td><td nowrap="nowrap"> *sub_key* is a string that holds the name of the subkey with which the value is</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_252">252-</td><td nowrap="nowrap"> associated. If this parameter is ``None`` or empty, the<span class="diff_sub"> </span> function retrieves the</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_251">251+</td><td nowrap="nowrap"> associated. If this parameter is ``None`` or empty, the function retrieves the</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_253">253-</td><td nowrap="nowrap"> value set by the :func:`SetValue` method <span class="diff_sub"> </span>for the key identified by *key*.</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_252">252+</td><td nowrap="nowrap"> value set by the :func:`SetValue` method for the key identified by *key*.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_254">254</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__41"></td><td class="diff_header" id="from60_255">255</td><td nowrap="nowrap"> Values in the registry have name, type, and data components. This method</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_256">256</td><td nowrap="nowrap"> retrieves the data for a key's first value that has a NULL name. But the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_257">257</td><td nowrap="nowrap"> underlying API call doesn't return the type, so always use</td></tr> <tr><td class="diff_next" id="difflib_chg_to60__42"></td><td class="diff_header" id="from60_258">258</td><td nowrap="nowrap"> :func:`QueryValueEx` if possible.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_259">259</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_260">260</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_261">261</td><td nowrap="nowrap">.. function:: QueryValueEx(key, value_name)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_262">262</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__42">n</a></td><td class="diff_header" id="from60_263">263-</td><td nowrap="nowrap"> Retrieves the type and data for a specified value name associated with<span class="diff_sub"> an open</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__42">n</a></td><td class="diff_header" id="to60_262">262+</td><td nowrap="nowrap"> Retrieves the type and data for a specified value name associated with</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_264">264-</td><td nowrap="nowrap"> registry key.</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_263">263+</td><td nowrap="nowrap"> <span class="diff_add"> an open</span> registry key.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_265">265</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__43">n</a></td><td class="diff_header" id="from60_266">266-</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined<span class="diff_sub"> :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__43">n</a></td><td class="diff_header" id="to60_265">265+</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_267">267-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_266">266+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_268">268</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_269">269</td><td nowrap="nowrap"> *value_name* is a string indicating the value to query.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_270">270</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__43"></td><td class="diff_header" id="from60_271">271</td><td nowrap="nowrap"> The result is a tuple of 2 items:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_272">272</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_273">273</td><td nowrap="nowrap"> +-------+-----------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_274">274</td><td nowrap="nowrap"> | Index | Meaning | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_275">275</td><td nowrap="nowrap"> +=======+=========================================+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_276">276</td><td nowrap="nowrap"> | ``0`` | The value of the registry item. | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_277">277</td><td nowrap="nowrap"> +-------+-----------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_278">278</td><td nowrap="nowrap"> | ``1`` | An integer giving the registry type for | </td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__44">n</a></td><td class="diff_header" id="to60_278">278+</td><td nowrap="nowrap"><span class="diff_add"> | | this value (see table in docs for | </span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__44"></td><td class="diff_header" id="from60_279">279-</td><td nowrap="nowrap"> | | th<span class="diff_chg">is v</span>alue<span class="diff_chg">. </span> | </td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__44"></td><td class="diff_header" id="to60_279">279+</td><td nowrap="nowrap"> | | <span class="diff_add">:me</span>th<span class="diff_chg">:`SetV</span>alue<span class="diff_chg">Ex`)</span> | </td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_280">280</td><td nowrap="nowrap"> +-------+-----------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_281">281</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__45"></td><td class="diff_header" id="from60_282">282</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_283">283</td><td nowrap="nowrap">.. function:: SaveKey(key, file_name)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_284">284</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_285">285</td><td nowrap="nowrap"> Saves the specified key, and all its subkeys to the specified file.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_286">286</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next" id="difflib_chg_to60__46"><a href="#difflib_chg_to60__45">n</a></td><td class="diff_header" id="from60_287">287-</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined<span class="diff_sub"> :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__46"><a href="#difflib_chg_to60__45">n</a></td><td class="diff_header" id="to60_287">287+</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_288">288-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_288">288+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> + <tr><td class="diff_next" id="difflib_chg_to60__47"></td><td class="diff_header" id="from60_289">289</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__46">n</a></td><td class="diff_header" id="from60_290">290-</td><td nowrap="nowrap"> *file_name* is the name of the file to save registry data to. This file<span class="diff_sub"> cannot</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__46">n</a></td><td class="diff_header" id="to60_290">290+</td><td nowrap="nowrap"> *file_name* is the name of the file to save registry data to.<span class="diff_add"> </span> This file</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_291">291-</td><td nowrap="nowrap"> already exist. If this filename includes an extension, it cannot be<span class="diff_sub"> used on file</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_291">291+</td><td nowrap="nowrap"> <span class="diff_add"> cannot</span> already exist. If this filename includes an extension, it cannot be</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_292">292-</td><td nowrap="nowrap"> allocation table (FAT) file systems by the :meth:`LoadKey`<span class="diff_sub">, :meth:`ReplaceKey`</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_292">292+</td><td nowrap="nowrap"> <span class="diff_add"> used on file</span> allocation table (FAT) file systems by the :meth:`LoadKey`</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_293">293-</td><td nowrap="nowrap"><span class="diff_sub"> or :meth:`RestoreKey` methods.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_293">293+</td><td nowrap="nowrap"><span class="diff_add"> method.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_294">294</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__47">n</a></td><td class="diff_header" id="from60_295">295-</td><td nowrap="nowrap"> If *key* represents a key on a remote computer, the path<span class="diff_sub"> </span> described by</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__47">n</a></td><td class="diff_header" id="to60_295">295+</td><td nowrap="nowrap"> If *key* represents a key on a remote computer, the path described by</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_296">296</td><td nowrap="nowrap"> *file_name* is relative to the remote computer. The caller of this method must</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__48">n</a></td><td class="diff_header" id="from60_297">297-</td><td nowrap="nowrap"> possess the :const:`SeBackupPrivilege` <span class="diff_sub"> </span>security privilege. Note that</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__48">n</a></td><td class="diff_header" id="to60_297">297+</td><td nowrap="nowrap"> possess the :const:`SeBackupPrivilege` security privilege. Note that</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_298">298-</td><td nowrap="nowrap"> privileges are different than permissions <span class="diff_sub"> </span>- see the<span class="diff_sub"> Win32 documentation for</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_298">298+</td><td nowrap="nowrap"> privileges are different than permissions -<span class="diff_add">-</span> see the</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_299">299+</td><td nowrap="nowrap"><span class="diff_add"> `Conflicts Between User Rights and Permissions documentation</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_300">300+</td><td nowrap="nowrap"><span class="diff_add"> <http://msdn.microsoft.com/en-us/library/ms724878%28v=VS.85%29.aspx>`__</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_299">299-</td><td nowrap="nowrap"> more details.</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_301">301+</td><td nowrap="nowrap"> <span class="diff_add"> for</span> more details.</td></tr> + <tr><td class="diff_next" id="difflib_chg_to60__48"></td><td class="diff_header" id="from60_300">300</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_301">301</td><td nowrap="nowrap"> This function passes NULL for *security_attributes* to the API.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_302">302</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__49"></td><td class="diff_header" id="from60_303">303</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_304">304</td><td nowrap="nowrap">.. function:: SetValue(key, sub_key, type, value)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_305">305</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_306">306</td><td nowrap="nowrap"> Associates a value with a specified key.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_307">307</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__49">n</a></td><td class="diff_header" id="from60_308">308-</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined<span class="diff_sub"> :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__49">n</a></td><td class="diff_header" id="to60_310">310+</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_309">309-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_311">311+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_310">310</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__50">n</a></td><td class="diff_header" id="from60_311">311-</td><td nowrap="nowrap"> *sub_key* is a string that names the subkey with which the value <span class="diff_sub"> </span>is associated.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__50">n</a></td><td class="diff_header" id="to60_313">313+</td><td nowrap="nowrap"> *sub_key* is a string that names the subkey with which the value is associated.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_312">312</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_313">313</td><td nowrap="nowrap"> *type* is an integer that specifies the type of the data. Currently this must be</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_314">314</td><td nowrap="nowrap"> :const:`REG_SZ`, meaning only strings are supported. Use the :func:`SetValueEx`</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_315">315</td><td nowrap="nowrap"> function for support for other data types.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_316">316</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_317">317</td><td nowrap="nowrap"> *value* is a string that specifies the new value.</td></tr> <tr><td class="diff_next" id="difflib_chg_to60__50"></td><td class="diff_header" id="from60_318">318</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_319">319</td><td nowrap="nowrap"> If the key specified by the *sub_key* parameter does not exist, the SetValue</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_320">320</td><td nowrap="nowrap"> function creates it.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_321">321</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_322">322</td><td nowrap="nowrap"> Value lengths are limited by available memory. Long values (more than 2048</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_323">323</td><td nowrap="nowrap"> bytes) should be stored as files with the filenames stored in the configuration</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_324">324</td><td nowrap="nowrap"> registry. This helps the registry perform efficiently.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_325">325</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next" id="difflib_chg_to60__51"><a href="#difflib_chg_to60__51">n</a></td><td class="diff_header" id="from60_326">326-</td><td nowrap="nowrap"> The key identified by the *key* parameter must have been<span class="diff_sub"> </span> opened with</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__51"><a href="#difflib_chg_to60__51">n</a></td><td class="diff_header" id="to60_328">328+</td><td nowrap="nowrap"> The key identified by the *key* parameter must have been opened with</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_327">327</td><td nowrap="nowrap"> :const:`KEY_SET_VALUE` access.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_328">328</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__52"></td><td class="diff_header" id="from60_329">329</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_330">330</td><td nowrap="nowrap">.. function:: SetValueEx(key, value_name, reserved, type, value)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_331">331</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__53"></td><td class="diff_header" id="from60_332">332</td><td nowrap="nowrap"> Stores data in the value field of an open registry key.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_333">333</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__52">n</a></td><td class="diff_header" id="from60_334">334-</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined<span class="diff_sub"> :const:`HKEY_\*`</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__52">n</a></td><td class="diff_header" id="to60_336">336+</td><td nowrap="nowrap"> *key* is an already open key, or one of the predefined</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__54"></td><td class="diff_header" id="from60_335">335-</td><td nowrap="nowrap"><span class="diff_sub"> constants.</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__54"></td><td class="diff_header" id="to60_337">337+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_336">336</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__53">n</a></td><td class="diff_header" id="from60_337">337-</td><td nowrap="nowrap"> *value_name* is a string that names the subkey with which the<span class="diff_sub"> </span> value is</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__53">n</a></td><td class="diff_header" id="to60_339">339+</td><td nowrap="nowrap"> *value_name* is a string that names the subkey with which the value is</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_338">338</td><td nowrap="nowrap"> associated.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_339">339</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__54">n</a></td><td class="diff_header" id="from60_340">340-</td><td nowrap="nowrap"> *type* is an integer that specifies the type of the data. <span class="diff_chg"> This should b</span>e<span class="diff_sub"> on</span>e</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__54">n</a></td><td class="diff_header" id="to60_342">342+</td><td nowrap="nowrap"> *type* is an integer that specifies the type of the data. <span class="diff_chg">S</span>ee</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_341">341-</td><td nowrap="nowrap"><span class="diff_sub"> of the following constants defined in this module:</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_343">343+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`Value Types <value-types>` for the available types.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_342">342</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__55">n</a></td><td class="diff_header" id="from60_343">343-</td><td nowrap="nowrap"><span class="diff_sub"> +----------------------------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_344">344-</td><td nowrap="nowrap"><span class="diff_sub"> | Constant | Meaning | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_345">345-</td><td nowrap="nowrap"><span class="diff_sub"> +==================================+=============================================+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_346">346-</td><td nowrap="nowrap"><span class="diff_sub"> | :const:`REG_BINARY` | Binary data in any form. | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_347">347-</td><td nowrap="nowrap"><span class="diff_sub"> +----------------------------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_348">348-</td><td nowrap="nowrap"><span class="diff_sub"> | :const:`REG_DWORD` | A 32-bit number. | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_349">349-</td><td nowrap="nowrap"><span class="diff_sub"> +----------------------------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_350">350-</td><td nowrap="nowrap"><span class="diff_sub"> | :const:`REG_DWORD_LITTLE_ENDIAN` | A 32-bit number in little-endian format. | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_351">351-</td><td nowrap="nowrap"><span class="diff_sub"> +----------------------------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_352">352-</td><td nowrap="nowrap"><span class="diff_sub"> | :const:`REG_DWORD_BIG_ENDIAN` | A 32-bit number in big-endian format. | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_353">353-</td><td nowrap="nowrap"><span class="diff_sub"> +----------------------------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_354">354-</td><td nowrap="nowrap"><span class="diff_sub"> | :const:`REG_EXPAND_SZ` | Null-terminated string containing | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_355">355-</td><td nowrap="nowrap"><span class="diff_sub"> | | references to environment variables | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_356">356-</td><td nowrap="nowrap"><span class="diff_sub"> | | (``%PATH%``). | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_357">357-</td><td nowrap="nowrap"><span class="diff_sub"> +----------------------------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_358">358-</td><td nowrap="nowrap"><span class="diff_sub"> | :const:`REG_LINK` | A Unicode symbolic link. | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_359">359-</td><td nowrap="nowrap"><span class="diff_sub"> +----------------------------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_360">360-</td><td nowrap="nowrap"><span class="diff_sub"> | :const:`REG_MULTI_SZ` | A sequence of null-terminated strings, | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_361">361-</td><td nowrap="nowrap"><span class="diff_sub"> | | terminated by two null characters. (Python | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_362">362-</td><td nowrap="nowrap"><span class="diff_sub"> | | handles this termination automatically.) | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_363">363-</td><td nowrap="nowrap"><span class="diff_sub"> +----------------------------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_364">364-</td><td nowrap="nowrap"><span class="diff_sub"> | :const:`REG_NONE` | No defined value type. | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_365">365-</td><td nowrap="nowrap"><span class="diff_sub"> +----------------------------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_366">366-</td><td nowrap="nowrap"><span class="diff_sub"> | :const:`REG_RESOURCE_LIST` | A device-driver resource list. | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_367">367-</td><td nowrap="nowrap"><span class="diff_sub"> +----------------------------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_368">368-</td><td nowrap="nowrap"><span class="diff_sub"> | :const:`REG_SZ` | A null-terminated string. | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_369">369-</td><td nowrap="nowrap"><span class="diff_sub"> +----------------------------------+---------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_370">370-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__55"></td><td class="diff_header" id="from60_371">371-</td><td nowrap="nowrap"> *reserved* can be anything - zero is always passed to the<span class="diff_sub"> </span> API.</td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__55"></td><td class="diff_header" id="to60_345">345+</td><td nowrap="nowrap"> *reserved* can be anything -<span class="diff_add">-</span> zero is always passed to the API.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_372">372</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_373">373</td><td nowrap="nowrap"> *value* is a string that specifies the new value.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_374">374</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_375">375</td><td nowrap="nowrap"> This method can also set additional value and type information for the specified</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_376">376</td><td nowrap="nowrap"> key. The key identified by the key parameter must have been opened with</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_377">377</td><td nowrap="nowrap"> :const:`KEY_SET_VALUE` access.</td></tr> <tr><td class="diff_next" id="difflib_chg_to60__56"></td><td class="diff_header" id="from60_378">378</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__56">n</a></td><td class="diff_header" id="from60_379">379-</td><td nowrap="nowrap"> To open the key, use the :func:`CreateKey<span class="diff_sub">Ex</span>` or<span class="diff_sub"> </span> :func:`OpenKey` methods.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__56">n</a></td><td class="diff_header" id="to60_353">353+</td><td nowrap="nowrap"> To open the key, use the :func:`CreateKey` or :func:`OpenKey` methods.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_380">380</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_381">381</td><td nowrap="nowrap"> Value lengths are limited by available memory. Long values (more than 2048</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_382">382</td><td nowrap="nowrap"> bytes) should be stored as files with the filenames stored in the configuration</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_383">383</td><td nowrap="nowrap"> registry. This helps the registry perform efficiently.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_384">384</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_385">385</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__57">n</a></td><td class="diff_header" id="to60_360">360+</td><td nowrap="nowrap"><span class="diff_add">.. function:: DisableReflectionKey(key)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_361">361+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_362">362+</td><td nowrap="nowrap"><span class="diff_add"> Disables registry reflection for 32-bit processes running on a 64-bit</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_363">363+</td><td nowrap="nowrap"><span class="diff_add"> operating system.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_364">364+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_365">365+</td><td nowrap="nowrap"><span class="diff_add"> *key* is an already open key, or one of the predefined</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_366">366+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_367">367+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_368">368+</td><td nowrap="nowrap"><span class="diff_add"> Will generally raise :exc:`NotImplemented` if executed on a 32-bit</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_369">369+</td><td nowrap="nowrap"><span class="diff_add"> operating system.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_370">370+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_371">371+</td><td nowrap="nowrap"><span class="diff_add"> If the key is not on the reflection list, the function succeeds but has no</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_372">372+</td><td nowrap="nowrap"><span class="diff_add"> effect. Disabling reflection for a key does not affect reflection of any</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_373">373+</td><td nowrap="nowrap"><span class="diff_add"> subkeys.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_374">374+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_375">375+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_376">376+</td><td nowrap="nowrap"><span class="diff_add">.. function:: EnableReflectionKey(key)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_377">377+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_378">378+</td><td nowrap="nowrap"><span class="diff_add"> Restores registry reflection for the specified disabled key.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_379">379+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_380">380+</td><td nowrap="nowrap"><span class="diff_add"> *key* is an already open key, or one of the predefined</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_381">381+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_382">382+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_383">383+</td><td nowrap="nowrap"><span class="diff_add"> Will generally raise :exc:`NotImplemented` if executed on a 32-bit</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_384">384+</td><td nowrap="nowrap"><span class="diff_add"> operating system.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_385">385+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_386">386+</td><td nowrap="nowrap"><span class="diff_add"> Restoring reflection for a key does not affect reflection of any subkeys.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_387">387+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_388">388+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_389">389+</td><td nowrap="nowrap"><span class="diff_add">.. function:: QueryReflectionKey(key)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_390">390+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_391">391+</td><td nowrap="nowrap"><span class="diff_add"> Determines the reflection state for the specified key.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_392">392+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_393">393+</td><td nowrap="nowrap"><span class="diff_add"> *key* is an already open key, or one of the predefined</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_394">394+</td><td nowrap="nowrap"><span class="diff_add"> :ref:`HKEY_* constants <hkey-constants>`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_395">395+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_396">396+</td><td nowrap="nowrap"><span class="diff_add"> Returns ``True`` if reflection is disabled.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_397">397+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_398">398+</td><td nowrap="nowrap"><span class="diff_add"> Will generally raise :exc:`NotImplemented` if executed on a 32-bit</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_399">399+</td><td nowrap="nowrap"><span class="diff_add"> operating system.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_400">400+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_401">401+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_402">402+</td><td nowrap="nowrap"><span class="diff_add">.. _constants:</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_403">403+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_404">404+</td><td nowrap="nowrap"><span class="diff_add">Constants</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_405">405+</td><td nowrap="nowrap"><span class="diff_add">------------------</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_406">406+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_407">407+</td><td nowrap="nowrap"><span class="diff_add">The following constants are defined for use in many :mod:`_winreg` functions.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_408">408+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_409">409+</td><td nowrap="nowrap"><span class="diff_add">.. _hkey-constants:</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_410">410+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_411">411+</td><td nowrap="nowrap"><span class="diff_add">HKEY_* Constants</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_412">412+</td><td nowrap="nowrap"><span class="diff_add">++++++++++++++++</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_413">413+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_414">414+</td><td nowrap="nowrap"><span class="diff_add">.. data:: HKEY_CLASSES_ROOT</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_415">415+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_416">416+</td><td nowrap="nowrap"><span class="diff_add"> Registry entries subordinate to this key define types (or classes) of</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_417">417+</td><td nowrap="nowrap"><span class="diff_add"> documents and the properties associated with those types. Shell and</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_418">418+</td><td nowrap="nowrap"><span class="diff_add"> COM applications use the information stored under this key.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_419">419+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_420">420+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_421">421+</td><td nowrap="nowrap"><span class="diff_add">.. data:: HKEY_CURRENT_USER</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_422">422+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_423">423+</td><td nowrap="nowrap"><span class="diff_add"> Registry entries subordinate to this key define the preferences of</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_424">424+</td><td nowrap="nowrap"><span class="diff_add"> the current user. These preferences include the settings of</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_425">425+</td><td nowrap="nowrap"><span class="diff_add"> environment variables, data about program groups, colors, printers,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_426">426+</td><td nowrap="nowrap"><span class="diff_add"> network connections, and application preferences.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_427">427+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_428">428+</td><td nowrap="nowrap"><span class="diff_add">.. data:: HKEY_LOCAL_MACHINE</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_429">429+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_430">430+</td><td nowrap="nowrap"><span class="diff_add"> Registry entries subordinate to this key define the physical state</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_431">431+</td><td nowrap="nowrap"><span class="diff_add"> of the computer, including data about the bus type, system memory,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_432">432+</td><td nowrap="nowrap"><span class="diff_add"> and installed hardware and software.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_433">433+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_434">434+</td><td nowrap="nowrap"><span class="diff_add">.. data:: HKEY_USERS</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_435">435+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_436">436+</td><td nowrap="nowrap"><span class="diff_add"> Registry entries subordinate to this key define the default user</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_437">437+</td><td nowrap="nowrap"><span class="diff_add"> configuration for new users on the local computer and the user</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_438">438+</td><td nowrap="nowrap"><span class="diff_add"> configuration for the current user.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_439">439+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_440">440+</td><td nowrap="nowrap"><span class="diff_add">.. data:: HKEY_PERFORMANCE_DATA</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_441">441+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_442">442+</td><td nowrap="nowrap"><span class="diff_add"> Registry entries subordinate to this key allow you to access</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_443">443+</td><td nowrap="nowrap"><span class="diff_add"> performance data. The data is not actually stored in the registry;</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_444">444+</td><td nowrap="nowrap"><span class="diff_add"> the registry functions cause the system to collect the data from</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_445">445+</td><td nowrap="nowrap"><span class="diff_add"> its source.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_446">446+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_447">447+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_448">448+</td><td nowrap="nowrap"><span class="diff_add">.. data:: HKEY_CURRENT_CONFIG</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_449">449+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_450">450+</td><td nowrap="nowrap"><span class="diff_add"> Contains information about the current hardware profile of the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_451">451+</td><td nowrap="nowrap"><span class="diff_add"> local computer system.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_452">452+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_453">453+</td><td nowrap="nowrap"><span class="diff_add">.. data:: HKEY_DYN_DATA</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_454">454+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_455">455+</td><td nowrap="nowrap"><span class="diff_add"> This key is not used in versions of Windows after 98.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_456">456+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_457">457+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_458">458+</td><td nowrap="nowrap"><span class="diff_add">.. _access-rights:</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_459">459+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_460">460+</td><td nowrap="nowrap"><span class="diff_add">Access Rights</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_461">461+</td><td nowrap="nowrap"><span class="diff_add">+++++++++++++</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_462">462+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_463">463+</td><td nowrap="nowrap"><span class="diff_add">For more information, see `Registry Key Security and Access</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_464">464+</td><td nowrap="nowrap"><span class="diff_add"><http://msdn.microsoft.com/en-us/library/ms724878%28v=VS.85%29.aspx>`__.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_465">465+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_466">466+</td><td nowrap="nowrap"><span class="diff_add">.. data:: KEY_ALL_ACCESS</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_467">467+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_468">468+</td><td nowrap="nowrap"><span class="diff_add"> Combines the STANDARD_RIGHTS_REQUIRED, :const:`KEY_QUERY_VALUE`,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_469">469+</td><td nowrap="nowrap"><span class="diff_add"> :const:`KEY_SET_VALUE`, :const:`KEY_CREATE_SUB_KEY`,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_470">470+</td><td nowrap="nowrap"><span class="diff_add"> :const:`KEY_ENUMERATE_SUB_KEYS`, :const:`KEY_NOTIFY`,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_471">471+</td><td nowrap="nowrap"><span class="diff_add"> and :const:`KEY_CREATE_LINK` access rights.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_472">472+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_473">473+</td><td nowrap="nowrap"><span class="diff_add">.. data:: KEY_WRITE</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_474">474+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_475">475+</td><td nowrap="nowrap"><span class="diff_add"> Combines the STANDARD_RIGHTS_WRITE, :const:`KEY_SET_VALUE`, and</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_476">476+</td><td nowrap="nowrap"><span class="diff_add"> :const:`KEY_CREATE_SUB_KEY` access rights.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_477">477+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_478">478+</td><td nowrap="nowrap"><span class="diff_add">.. data:: KEY_READ</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_479">479+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_480">480+</td><td nowrap="nowrap"><span class="diff_add"> Combines the STANDARD_RIGHTS_READ, :const:`KEY_QUERY_VALUE`,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_481">481+</td><td nowrap="nowrap"><span class="diff_add"> :const:`KEY_ENUMERATE_SUB_KEYS`, and :const:`KEY_NOTIFY` values.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_482">482+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_483">483+</td><td nowrap="nowrap"><span class="diff_add">.. data:: KEY_EXECUTE</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_484">484+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_485">485+</td><td nowrap="nowrap"><span class="diff_add"> Equivalent to :const:`KEY_READ`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_486">486+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_487">487+</td><td nowrap="nowrap"><span class="diff_add">.. data:: KEY_QUERY_VALUE</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_488">488+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_489">489+</td><td nowrap="nowrap"><span class="diff_add"> Required to query the values of a registry key.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_490">490+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_491">491+</td><td nowrap="nowrap"><span class="diff_add">.. data:: KEY_SET_VALUE</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_492">492+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_493">493+</td><td nowrap="nowrap"><span class="diff_add"> Required to create, delete, or set a registry value.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_494">494+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_495">495+</td><td nowrap="nowrap"><span class="diff_add">.. data:: KEY_CREATE_SUB_KEY</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_496">496+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_497">497+</td><td nowrap="nowrap"><span class="diff_add"> Required to create a subkey of a registry key.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_498">498+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_499">499+</td><td nowrap="nowrap"><span class="diff_add">.. data:: KEY_ENUMERATE_SUB_KEYS</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_500">500+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_501">501+</td><td nowrap="nowrap"><span class="diff_add"> Required to enumerate the subkeys of a registry key.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_502">502+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_503">503+</td><td nowrap="nowrap"><span class="diff_add">.. data:: KEY_NOTIFY</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_504">504+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_505">505+</td><td nowrap="nowrap"><span class="diff_add"> Required to request change notifications for a registry key or for</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_506">506+</td><td nowrap="nowrap"><span class="diff_add"> subkeys of a registry key.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_507">507+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_508">508+</td><td nowrap="nowrap"><span class="diff_add">.. data:: KEY_CREATE_LINK</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_509">509+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_510">510+</td><td nowrap="nowrap"><span class="diff_add"> Reserved for system use.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_511">511+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_512">512+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_513">513+</td><td nowrap="nowrap"><span class="diff_add">.. _64-bit-access-rights:</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_514">514+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_515">515+</td><td nowrap="nowrap"><span class="diff_add">64-bit Specific</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_516">516+</td><td nowrap="nowrap"><span class="diff_add">***************</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_517">517+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_518">518+</td><td nowrap="nowrap"><span class="diff_add">For more information, see `Accesing an Alternate Registry View</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_519">519+</td><td nowrap="nowrap"><span class="diff_add"><http://msdn.microsoft.com/en-us/library/aa384129(v=VS.85).aspx>`__.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_520">520+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_521">521+</td><td nowrap="nowrap"><span class="diff_add">.. data:: KEY_WOW64_64KEY</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_522">522+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_523">523+</td><td nowrap="nowrap"><span class="diff_add"> Indicates that an application on 64-bit Windows should operate on</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_524">524+</td><td nowrap="nowrap"><span class="diff_add"> the 64-bit registry view.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_525">525+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_526">526+</td><td nowrap="nowrap"><span class="diff_add">.. data:: KEY_WOW64_32KEY</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_527">527+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_528">528+</td><td nowrap="nowrap"><span class="diff_add"> Indicates that an application on 64-bit Windows should operate on</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_529">529+</td><td nowrap="nowrap"><span class="diff_add"> the 32-bit registry view.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_530">530+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_531">531+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_532">532+</td><td nowrap="nowrap"><span class="diff_add">.. _value-types:</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_533">533+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_534">534+</td><td nowrap="nowrap"><span class="diff_add">Value Types</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_535">535+</td><td nowrap="nowrap"><span class="diff_add">+++++++++++</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_536">536+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_537">537+</td><td nowrap="nowrap"><span class="diff_add">For more information, see `Registry Value Types</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_538">538+</td><td nowrap="nowrap"><span class="diff_add"><http://msdn.microsoft.com/en-us/library/ms724884%28v=VS.85%29.aspx>`__.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_539">539+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_540">540+</td><td nowrap="nowrap"><span class="diff_add">.. data:: REG_BINARY</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_541">541+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_542">542+</td><td nowrap="nowrap"><span class="diff_add"> Binary data in any form.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_543">543+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_544">544+</td><td nowrap="nowrap"><span class="diff_add">.. data:: REG_DWORD</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_545">545+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_546">546+</td><td nowrap="nowrap"><span class="diff_add"> 32-bit number.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_547">547+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_548">548+</td><td nowrap="nowrap"><span class="diff_add">.. data:: REG_DWORD_LITTLE_ENDIAN</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_549">549+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_550">550+</td><td nowrap="nowrap"><span class="diff_add"> A 32-bit number in little-endian format.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_551">551+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_552">552+</td><td nowrap="nowrap"><span class="diff_add">.. data:: REG_DWORD_BIG_ENDIAN</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_553">553+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_554">554+</td><td nowrap="nowrap"><span class="diff_add"> A 32-bit number in big-endian format.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_555">555+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_556">556+</td><td nowrap="nowrap"><span class="diff_add">.. data:: REG_EXPAND_SZ</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_557">557+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_558">558+</td><td nowrap="nowrap"><span class="diff_add"> Null-terminated string containing references to environment</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_559">559+</td><td nowrap="nowrap"><span class="diff_add"> variables (``%PATH%``).</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_560">560+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_561">561+</td><td nowrap="nowrap"><span class="diff_add">.. data:: REG_LINK</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_562">562+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_563">563+</td><td nowrap="nowrap"><span class="diff_add"> A Unicode symbolic link.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_564">564+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_565">565+</td><td nowrap="nowrap"><span class="diff_add">.. data:: REG_MULTI_SZ</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_566">566+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_567">567+</td><td nowrap="nowrap"><span class="diff_add"> A sequence of null-terminated strings, terminated by two null characters.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_568">568+</td><td nowrap="nowrap"><span class="diff_add"> (Python handles this termination automatically.)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_569">569+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_570">570+</td><td nowrap="nowrap"><span class="diff_add">.. data:: REG_NONE</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_571">571+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_572">572+</td><td nowrap="nowrap"><span class="diff_add"> No defined value type.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_573">573+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_574">574+</td><td nowrap="nowrap"><span class="diff_add">.. data:: REG_RESOURCE_LIST</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_575">575+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_576">576+</td><td nowrap="nowrap"><span class="diff_add"> A device-driver resource list.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_577">577+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_578">578+</td><td nowrap="nowrap"><span class="diff_add">.. data:: REG_FULL_RESOURCE_DESCRIPTOR</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_579">579+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_580">580+</td><td nowrap="nowrap"><span class="diff_add"> A hardware setting.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_581">581+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_582">582+</td><td nowrap="nowrap"><span class="diff_add">.. data:: REG_RESOURCE_REQUIREMENTS_LIST</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_583">583+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_584">584+</td><td nowrap="nowrap"><span class="diff_add"> A hardware resource list.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_585">585+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_586">586+</td><td nowrap="nowrap"><span class="diff_add">.. data:: REG_SZ</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_587">587+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_588">588+</td><td nowrap="nowrap"><span class="diff_add"> A null-terminated string.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_589">589+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to60__57"></td><td class="diff_header" id="to60_590">590+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_386">386</td><td nowrap="nowrap">.. _handle-object:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_387">387</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_388">388</td><td nowrap="nowrap">Registry Handle Objects</td></tr> <tr><td class="diff_next" id="difflib_chg_to60__58"></td><td class="diff_header" id="from60_389">389</td><td nowrap="nowrap">-----------------------</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_390">390</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_391">391</td><td nowrap="nowrap">This object wraps a Windows HKEY object, automatically closing it when the</td></tr> <tr><td class="diff_next" id="difflib_chg_to60__59"></td><td class="diff_header" id="from60_392">392</td><td nowrap="nowrap">object is destroyed. To guarantee cleanup, you can call either the</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__58">n</a></td><td class="diff_header" id="from60_393">393-</td><td nowrap="nowrap">:meth:`Close` method on the object, or the<span class="diff_sub"> </span> :func:`CloseKey` function.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__58">n</a></td><td class="diff_header" id="to60_598">598+</td><td nowrap="nowrap">:meth:`<span class="diff_add">~PyHKEY.</span>Close` method on the object, or the :func:`CloseKey` function.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_394">394</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_395">395</td><td nowrap="nowrap">All registry functions in this module return one of these objects.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_396">396</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__59">n</a></td><td class="diff_header" id="from60_397">397-</td><td nowrap="nowrap">All registry functions in this module which accept a handle object <span class="diff_sub"> </span>also accept</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__59">n</a></td><td class="diff_header" id="to60_602">602+</td><td nowrap="nowrap">All registry functions in this module which accept a handle object also accept</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_398">398-</td><td nowrap="nowrap">an integer, however, use of the handle object is<span class="diff_sub"> </span> encouraged.</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_603">603+</td><td nowrap="nowrap">an integer, however, use of the handle object is encouraged.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_399">399</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__60">n</a></td><td class="diff_header" id="from60_400">400-</td><td nowrap="nowrap">Handle objects provide semantics for :meth:`__nonzero__` - thus<span class="diff_sub"> </span>::</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__60">n</a></td><td class="diff_header" id="to60_605">605+</td><td nowrap="nowrap">Handle objects provide semantics for :meth:`__nonzero__` -<span class="diff_add">-</span> thus::</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_401">401</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_402">402</td><td nowrap="nowrap"> if handle:</td></tr> <tr><td class="diff_next" id="difflib_chg_to60__60"></td><td class="diff_header" id="from60_403">403</td><td nowrap="nowrap"> print "Yes"</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_404">404</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__61"></td><td class="diff_header" id="from60_405">405</td><td nowrap="nowrap">will print ``Yes`` if the handle is currently valid (has not been closed or</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_406">406</td><td nowrap="nowrap">detached).</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_407">407</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_408">408</td><td nowrap="nowrap">The object also support comparison semantics, so handle objects will compare</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_409">409</td><td nowrap="nowrap">true if they both reference the same underlying Windows handle value.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_410">410</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__61">n</a></td><td class="diff_header" id="from60_411">411-</td><td nowrap="nowrap">Handle objects can be converted to an integer (e.g., using the builtin</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__61">n</a></td><td class="diff_header" id="to60_616">616+</td><td nowrap="nowrap">Handle objects can be converted to an integer (e.g., using the built<span class="diff_add">-</span>in</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_412">412</td><td nowrap="nowrap">:func:`int` function), in which case the underlying Windows handle value is</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__62">n</a></td><td class="diff_header" id="from60_413">413-</td><td nowrap="nowrap">returned. You can also use the<span class="diff_sub"> </span> :meth:`Detach` method to return the<span class="diff_sub"> integer</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__62">n</a></td><td class="diff_header" id="to60_618">618+</td><td nowrap="nowrap">returned. You can also use the :meth:`<span class="diff_add">~PyHKEY.</span>Detach` method to return the</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_414">414-</td><td nowrap="nowrap">handle, and also disconnect the Windows handle from the handle object.</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_619">619+</td><td nowrap="nowrap"><span class="diff_add">integer </span>handle, and also disconnect the Windows handle from the handle object.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_415">415</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_416">416</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_417">417</td><td nowrap="nowrap">.. method:: PyHKEY.Close()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_418">418</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_419">419</td><td nowrap="nowrap"> Closes the underlying Windows handle.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_420">420</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_421">421</td><td nowrap="nowrap"> If the handle is already closed, no error is raised.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_422">422</td><td nowrap="nowrap"></td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to60__62"></td><td class="diff_header" id="from60_425">425</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_426">426</td><td nowrap="nowrap"> Detaches the Windows handle from the handle object.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_427">427</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_428">428</td><td nowrap="nowrap"> The result is an integer (or long on 64 bit Windows) that holds the value of the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_429">429</td><td nowrap="nowrap"> handle before it is detached. If the handle is already detached or closed, this</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_430">430</td><td nowrap="nowrap"> will return zero.</td></tr> <tr><td class="diff_next" id="difflib_chg_to60__63"></td><td class="diff_header" id="from60_431">431</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_432">432</td><td nowrap="nowrap"> After calling this function, the handle is effectively invalidated, but the</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__63">n</a></td><td class="diff_header" id="from60_433">433-</td><td nowrap="nowrap"> handle is not closed. You would call this function when <span class="diff_sub"> </span>you need the</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__63">n</a></td><td class="diff_header" id="to60_638">638+</td><td nowrap="nowrap"> handle is not closed. You would call this function when you need the</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_434">434-</td><td nowrap="nowrap"> underlying Win32 handle to exist beyond the lifetime <span class="diff_sub"> </span>of the handle object.</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_639">639+</td><td nowrap="nowrap"> underlying Win32 handle to exist beyond the lifetime of the handle object.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_435">435</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to60__64"></td><td class="diff_header" id="from60_436">436</td><td nowrap="nowrap">.. method:: PyHKEY.__enter__()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_437">437</td><td nowrap="nowrap"> PyHKEY.__exit__(\*exc_info)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_438">438</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__64">n</a></td><td class="diff_header" id="from60_439">439-</td><td nowrap="nowrap"> The HKEY object implements :meth:`__enter__` and<span class="diff_sub"> :meth:`__exit__` and thus</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__64">n</a></td><td class="diff_header" id="to60_644">644+</td><td nowrap="nowrap"> The HKEY object implements :meth:`<span class="diff_add">~object.</span>__enter__` and</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from60_440">440-</td><td nowrap="nowrap"><span class="diff_sub"> supports the context protocol for the :keyword:`with` statement::</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_645">645+</td><td nowrap="nowrap"><span class="diff_add"> :meth:`~object.__exit__` and thus supports the context protocol for the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to60_646">646+</td><td nowrap="nowrap"><span class="diff_add"> :keyword:`with` statement::</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_441">441</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_442">442</td><td nowrap="nowrap"> with OpenKey(HKEY_LOCAL_MACHINE, "foo") as key:</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to60__top">t</a></td><td class="diff_header" id="from60_443">443-</td><td nowrap="nowrap"> <span class="diff_sub"> #</span> ... work with key<span class="diff_sub"> ...</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to60__top">t</a></td><td class="diff_header" id="to60_649">649+</td><td nowrap="nowrap"> ...<span class="diff_add"> #</span> work with key</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from60_444">444</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_445">445</td><td nowrap="nowrap"> will automatically close *key* when control leaves the :keyword:`with` block.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_446">446</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_447">447</td><td nowrap="nowrap"> .. versionadded:: 2.6</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from60_448">448</td><td nowrap="nowrap"></td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/aepack.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,32 @@ +--- r262/library/aepack.rst 2008-05-13 06:42:13.839063000 +0900 ++++ r266/library/aepack.rst 2009-04-29 03:23:28.138007000 +0900 +@@ -5,27 +5,27 @@ + .. module:: aepack + :platform: Mac + :synopsis: Conversion between Python variables and AppleEvent data containers. + :deprecated: + .. sectionauthor:: Vincent Marchetti <vince****@en*****> + .. moduleauthor:: Jack Jansen + + The :mod:`aepack` module defines functions for converting (packing) Python + variables to AppleEvent descriptors and back (unpacking). Within Python the + AppleEvent descriptor is handled by Python objects of built-in type + :class:`AEDesc`, defined in module :mod:`Carbon.AE`. + +-.. warning:: ++.. note:: + +- This module is removed in 3.0. ++ This module has been removed in Python 3.x. + + + The :mod:`aepack` module defines the following functions: + + + .. function:: pack(x[, forcetype]) + + Returns an :class:`AEDesc` object containing a conversion of Python value x. If + *forcetype* is provided it specifies the descriptor type of the result. + Otherwise, a default mapping of Python types to Apple Event descriptor types is + used, as follows: + ======================================= --- /dev/null +++ /library/diff/aepack.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,52 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to61__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/aepack.rst => r266/library/aepack.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to61__0"></td><td class="diff_header" id="from61_9">9</td><td nowrap="nowrap">.. sectionauthor:: Vincent Marchetti <vince****@en*****></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from61_10">10</td><td nowrap="nowrap">.. moduleauthor:: Jack Jansen</td></tr> <tr><td class="diff_next" id="difflib_chg_to61__1"></td><td class="diff_header" id="from61_11">11</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from61_12">12</td><td nowrap="nowrap">The :mod:`aepack` module defines functions for converting (packing) Python</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from61_13">13</td><td nowrap="nowrap">variables to AppleEvent descriptors and back (unpacking). Within Python the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from61_14">14</td><td nowrap="nowrap">AppleEvent descriptor is handled by Python objects of built-in type</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from61_15">15</td><td nowrap="nowrap">:class:`AEDesc`, defined in module :mod:`Carbon.AE`.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from61_16">16</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to61__1">n</a></td><td class="diff_header" id="from61_17">17-</td><td nowrap="nowrap"><span class="diff_sub">.. warning::</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to61__1">n</a></td><td class="diff_header" id="to61_17">17+</td><td nowrap="nowrap"><span class="diff_add">.. note::</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from61_18">18</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to61__top">t</a></td><td class="diff_header" id="from61_19">19-</td><td nowrap="nowrap"> This module <span class="diff_chg">i</span>s removed in 3.<span class="diff_chg">0</span>.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to61__top">t</a></td><td class="diff_header" id="to61_19">19+</td><td nowrap="nowrap"> This module <span class="diff_chg">ha</span>s<span class="diff_add"> been</span> removed in <span class="diff_add">Python </span>3.<span class="diff_chg">x</span>.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from61_20">20</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from61_21">21</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from61_22">22</td><td nowrap="nowrap">The :mod:`aepack` module defines the following functions:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from61_23">23</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from61_24">24</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from61_25">25</td><td nowrap="nowrap">.. function:: pack(x[, forcetype])</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from61_26">26</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from61_27">27</td><td nowrap="nowrap"> Returns an :class:`AEDesc` object containing a conversion of Python value x. If</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/aetools.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,32 @@ +--- r262/library/aetools.rst 2008-05-13 06:42:13.839063000 +0900 ++++ r266/library/aetools.rst 2009-04-29 03:23:28.138007000 +0900 +@@ -13,27 +13,27 @@ + AppleScript client support is built. It also imports and re-exports the core + functionality of the :mod:`aetypes` and :mod:`aepack` modules. The stub packages + generated by :mod:`gensuitemodule` import the relevant portions of + :mod:`aetools`, so usually you do not need to import it yourself. The exception + to this is when you cannot use a generated suite package and need lower-level + access to scripting. + + The :mod:`aetools` module itself uses the AppleEvent support provided by the + :mod:`Carbon.AE` module. This has one drawback: you need access to the window + manager, see section :ref:`osx-gui-scripts` for details. This restriction may be + lifted in future releases. + +-.. warning:: ++.. note:: + +- This module is removed in 3.0. ++ This module has been removed in Python 3.x. + + + The :mod:`aetools` module defines the following functions: + + + .. function:: packevent(ae, parameters, attributes) + + Stores parameters and attributes in a pre-created ``Carbon.AE.AEDesc`` object. + ``parameters`` and ``attributes`` are dictionaries mapping 4-character OSA + parameter keys to Python objects. The objects are packed using + ``aepack.pack()``. + ======================================= --- /dev/null +++ /library/diff/aetools.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,52 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to62__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/aetools.rst => r266/library/aetools.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to62__0"></td><td class="diff_header" id="from62_17">17</td><td nowrap="nowrap">to this is when you cannot use a generated suite package and need lower-level</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from62_18">18</td><td nowrap="nowrap">access to scripting.</td></tr> <tr><td class="diff_next" id="difflib_chg_to62__1"></td><td class="diff_header" id="from62_19">19</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from62_20">20</td><td nowrap="nowrap">The :mod:`aetools` module itself uses the AppleEvent support provided by the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from62_21">21</td><td nowrap="nowrap">:mod:`Carbon.AE` module. This has one drawback: you need access to the window</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from62_22">22</td><td nowrap="nowrap">manager, see section :ref:`osx-gui-scripts` for details. This restriction may be</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from62_23">23</td><td nowrap="nowrap">lifted in future releases.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from62_24">24</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to62__1">n</a></td><td class="diff_header" id="from62_25">25-</td><td nowrap="nowrap"><span class="diff_sub">.. warning::</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to62__1">n</a></td><td class="diff_header" id="to62_25">25+</td><td nowrap="nowrap"><span class="diff_add">.. note::</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from62_26">26</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to62__top">t</a></td><td class="diff_header" id="from62_27">27-</td><td nowrap="nowrap"> This module <span class="diff_chg">i</span>s removed in 3.<span class="diff_chg">0</span>.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to62__top">t</a></td><td class="diff_header" id="to62_27">27+</td><td nowrap="nowrap"> This module <span class="diff_chg">ha</span>s<span class="diff_add"> been</span> removed in <span class="diff_add">Python </span>3.<span class="diff_chg">x</span>.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from62_28">28</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from62_29">29</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from62_30">30</td><td nowrap="nowrap">The :mod:`aetools` module defines the following functions:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from62_31">31</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from62_32">32</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from62_33">33</td><td nowrap="nowrap">.. function:: packevent(ae, parameters, attributes)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from62_34">34</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from62_35">35</td><td nowrap="nowrap"> Stores parameters and attributes in a pre-created ``Carbon.AE.AEDesc`` object.</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/aetypes.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,32 @@ +--- r262/library/aetypes.rst 2008-05-13 06:42:13.839063000 +0900 ++++ r266/library/aetypes.rst 2009-04-29 03:23:28.138007000 +0900 +@@ -22,27 +22,27 @@ + An object specifier is essentially an address of an object implemented in a + Apple Event server. An Apple Event specifier is used as the direct object for an + Apple Event or as the argument of an optional parameter. The :mod:`aetypes` + module contains the base classes for OSA classes and properties, which are used + by the packages generated by :mod:`gensuitemodule` to populate the classes and + properties in a given suite. + + For reasons of backward compatibility, and for cases where you need to script an + application for which you have not generated the stub package this module also + contains object specifiers for a number of common OSA classes such as + ``Document``, ``Window``, ``Character``, etc. + +-.. warning:: ++.. note:: + +- This module is removed in 3.0. ++ This module has been removed in Python 3.x. + + + + The :mod:`AEObjects` module defines the following classes to represent Apple + Event descriptor data: + + + .. class:: Unknown(type, data) + + The representation of OSA descriptor data for which the :mod:`aepack` and + :mod:`aetypes` modules have no support, i.e. anything that is not represented by + the other classes here and that is not equivalent to a simple Python value. ======================================= --- /dev/null +++ /library/diff/aetypes.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,52 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to63__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/aetypes.rst => r266/library/aetypes.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to63__0"></td><td class="diff_header" id="from63_26">26</td><td nowrap="nowrap">by the packages generated by :mod:`gensuitemodule` to populate the classes and</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from63_27">27</td><td nowrap="nowrap">properties in a given suite.</td></tr> <tr><td class="diff_next" id="difflib_chg_to63__1"></td><td class="diff_header" id="from63_28">28</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from63_29">29</td><td nowrap="nowrap">For reasons of backward compatibility, and for cases where you need to script an</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from63_30">30</td><td nowrap="nowrap">application for which you have not generated the stub package this module also</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from63_31">31</td><td nowrap="nowrap">contains object specifiers for a number of common OSA classes such as</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from63_32">32</td><td nowrap="nowrap">``Document``, ``Window``, ``Character``, etc.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from63_33">33</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to63__1">n</a></td><td class="diff_header" id="from63_34">34-</td><td nowrap="nowrap"><span class="diff_sub">.. warning::</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to63__1">n</a></td><td class="diff_header" id="to63_34">34+</td><td nowrap="nowrap"><span class="diff_add">.. note::</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from63_35">35</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to63__top">t</a></td><td class="diff_header" id="from63_36">36-</td><td nowrap="nowrap"> This module <span class="diff_chg">i</span>s removed in 3.<span class="diff_chg">0</span>.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to63__top">t</a></td><td class="diff_header" id="to63_36">36+</td><td nowrap="nowrap"> This module <span class="diff_chg">ha</span>s<span class="diff_add"> been</span> removed in <span class="diff_add">Python </span>3.<span class="diff_chg">x</span>.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from63_37">37</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from63_38">38</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from63_39">39</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from63_40">40</td><td nowrap="nowrap">The :mod:`AEObjects` module defines the following classes to represent Apple</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from63_41">41</td><td nowrap="nowrap">Event descriptor data:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from63_42">42</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from63_43">43</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from63_44">44</td><td nowrap="nowrap">.. class:: Unknown(type, data)</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/aifc.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,94 @@ +--- r262/library/aifc.rst 2009-01-04 06:55:17.853888000 +0900 ++++ r266/library/aifc.rst 2009-10-27 23:36:50.397095000 +0900 +@@ -1,34 +1,34 @@ +- + :mod:`aifc` --- Read and write AIFF and AIFC files + ================================================== + + .. module:: aifc + :synopsis: Read and write audio files in AIFF or AIFC format. + + + .. index:: + single: Audio Interchange File Format + single: AIFF + single: AIFF-C + + This module provides support for reading and writing AIFF and AIFF-C files. + AIFF is Audio Interchange File Format, a format for storing digital audio + samples in a file. AIFF-C is a newer version of the format that includes the + ability to compress the audio data. + +-.. warning:: ++.. note:: + + Some operations may only work under IRIX; these will raise :exc:`ImportError` +- when attempting to import the :mod:`cl` module, which is only available on IRIX. ++ when attempting to import the :mod:`cl` module, which is only available on ++ IRIX. + + Audio files have a number of parameters that describe the audio data. The + sampling rate or frame rate is the number of times per second the sound is + sampled. The number of channels indicate if the audio is mono, stereo, or + quadro. Each frame consists of one sample per channel. The sample size is the + size in bytes of each sample. Thus a frame consists of + *nchannels*\**samplesize* bytes, and a second's worth of audio consists of + *nchannels*\**samplesize*\**framerate* bytes. + + For example, CD quality audio has a sample size of two bytes (16 bits), uses two + channels (stereo) and has a frame rate of 44,100 frames/second. This gives a + frame size of 4 bytes (2\*2), and a second's worth occupies 2\*2\*44100 bytes +@@ -39,25 +39,25 @@ + + .. function:: open(file[, mode]) + + Open an AIFF or AIFF-C file and return an object instance with methods that are + described below. The argument *file* is either a string naming a file or a file + object. *mode* must be ``'r'`` or ``'rb'`` when the file must be opened for + reading, or ``'w'`` or ``'wb'`` when the file must be opened for writing. If + omitted, ``file.mode`` is used if it exists, otherwise ``'rb'`` is used. When + used for writing, the file object should be seekable, unless you know ahead of + time how many samples you are going to write in total and use + :meth:`writeframesraw` and :meth:`setnframes`. + +-Objects returned by :func:`open` when a file is opened for reading have the ++Objects returned by :func:`.open` when a file is opened for reading have the + following methods: + + + .. method:: aifc.getnchannels() + + Return the number of audio channels (1 for mono, 2 for stereo). + + + .. method:: aifc.getsampwidth() + + Return the size in bytes of individual samples. + +@@ -122,25 +122,25 @@ + + + .. method:: aifc.tell() + + Return the current frame number. + + + .. method:: aifc.close() + + Close the AIFF file. After calling this method, the object can no longer be + used. + +-Objects returned by :func:`open` when a file is opened for writing have all the ++Objects returned by :func:`.open` when a file is opened for writing have all the + above methods, except for :meth:`readframes` and :meth:`setpos`. In addition + the following methods exist. The :meth:`get\*` methods can only be called after + the corresponding :meth:`set\*` methods have been called. Before the first + :meth:`writeframes` or :meth:`writeframesraw`, all parameters except for the + number of frames must be filled in. + + + .. method:: aifc.aiff() + + Create an AIFF file. The default is that an AIFF-C file is created, unless the + name of the file ends in ``'.aiff'`` in which case the default is an AIFF file. + ======================================= --- /dev/null +++ /library/diff/aifc.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,64 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to64__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/aifc.rst => r266/library/aifc.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to64__0"><a href="#difflib_chg_to64__1">n</a></td><td class="diff_header" id="from64_1">1-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from64_2">2</td><td nowrap="nowrap">:mod:`aifc` --- Read and write AIFF and AIFC files</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_3">3</td><td nowrap="nowrap">==================================================</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_4">4</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_5">5</td><td nowrap="nowrap">.. module:: aifc</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_6">6</td><td nowrap="nowrap"> :synopsis: Read and write audio files in AIFF or AIFC format.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_7">7</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_8">8</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_9">9</td><td nowrap="nowrap">.. index::</td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to64__1"></td><td class="diff_header" id="from64_11">11</td><td nowrap="nowrap"> single: AIFF</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_12">12</td><td nowrap="nowrap"> single: AIFF-C</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_13">13</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to64__2"></td><td class="diff_header" id="from64_14">14</td><td nowrap="nowrap">This module provides support for reading and writing AIFF and AIFF-C files.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_15">15</td><td nowrap="nowrap">AIFF is Audio Interchange File Format, a format for storing digital audio</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_16">16</td><td nowrap="nowrap">samples in a file. AIFF-C is a newer version of the format that includes the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_17">17</td><td nowrap="nowrap">ability to compress the audio data.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_18">18</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to64__2">n</a></td><td class="diff_header" id="from64_19">19-</td><td nowrap="nowrap"><span class="diff_sub">.. warning::</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to64__2">n</a></td><td class="diff_header" id="to64_18">18+</td><td nowrap="nowrap"><span class="diff_add">.. note::</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from64_20">20</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_21">21</td><td nowrap="nowrap"> Some operations may only work under IRIX; these will raise :exc:`ImportError`</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to64__3">n</a></td><td class="diff_header" id="from64_22">22-</td><td nowrap="nowrap"> when attempting to import the :mod:`cl` module, which is only available on<span class="diff_sub"> IRIX.</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to64__3">n</a></td><td class="diff_header" id="to64_21">21+</td><td nowrap="nowrap"> when attempting to import the :mod:`cl` module, which is only available on</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to64_22">22+</td><td nowrap="nowrap"><span class="diff_add"> IRIX.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from64_23">23</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_24">24</td><td nowrap="nowrap">Audio files have a number of parameters that describe the audio data. The</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_25">25</td><td nowrap="nowrap">sampling rate or frame rate is the number of times per second the sound is</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_26">26</td><td nowrap="nowrap">sampled. The number of channels indicate if the audio is mono, stereo, or</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_27">27</td><td nowrap="nowrap">quadro. Each frame consists of one sample per channel. The sample size is the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_28">28</td><td nowrap="nowrap">size in bytes of each sample. Thus a frame consists of</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_29">29</td><td nowrap="nowrap">*nchannels*\**samplesize* bytes, and a second's worth of audio consists of</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_30">30</td><td nowrap="nowrap">*nchannels*\**samplesize*\**framerate* bytes.</td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to64__3"></td><td class="diff_header" id="from64_43">43</td><td nowrap="nowrap"> described below. The argument *file* is either a string naming a file or a file</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_44">44</td><td nowrap="nowrap"> object. *mode* must be ``'r'`` or ``'rb'`` when the file must be opened for</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_45">45</td><td nowrap="nowrap"> reading, or ``'w'`` or ``'wb'`` when the file must be opened for writing. If</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_46">46</td><td nowrap="nowrap"> omitted, ``file.mode`` is used if it exists, otherwise ``'rb'`` is used. When</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_47">47</td><td nowrap="nowrap"> used for writing, the file object should be seekable, unless you know ahead of</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_48">48</td><td nowrap="nowrap"> time how many samples you are going to write in total and use</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_49">49</td><td nowrap="nowrap"> :meth:`writeframesraw` and :meth:`setnframes`.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_50">50</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to64__4">n</a></td><td class="diff_header" id="from64_51">51-</td><td nowrap="nowrap">Objects returned by :func:`open` when a file is opened for reading have the</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to64__4">n</a></td><td class="diff_header" id="to64_51">51+</td><td nowrap="nowrap">Objects returned by :func:`<span class="diff_add">.</span>open` when a file is opened for reading have the</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from64_52">52</td><td nowrap="nowrap">following methods:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_53">53</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_54">54</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_55">55</td><td nowrap="nowrap">.. method:: aifc.getnchannels()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_56">56</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_57">57</td><td nowrap="nowrap"> Return the number of audio channels (1 for mono, 2 for stereo).</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_58">58</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_59">59</td><td nowrap="nowrap"></td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to64__4"></td><td class="diff_header" id="from64_126">126</td><td nowrap="nowrap"> Return the current frame number.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_127">127</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_128">128</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_129">129</td><td nowrap="nowrap">.. method:: aifc.close()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_130">130</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_131">131</td><td nowrap="nowrap"> Close the AIFF file. After calling this method, the object can no longer be</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_132">132</td><td nowrap="nowrap"> used.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_133">133</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to64__top">t</a></td><td class="diff_header" id="from64_134">134-</td><td nowrap="nowrap">Objects returned by :func:`open` when a file is opened for writing have all the</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to64__top">t</a></td><td class="diff_header" id="to64_134">134+</td><td nowrap="nowrap">Objects returned by :func:`<span class="diff_add">.</span>open` when a file is opened for writing have all the</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from64_135">135</td><td nowrap="nowrap">above methods, except for :meth:`readframes` and :meth:`setpos`. In addition</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_136">136</td><td nowrap="nowrap">the following methods exist. The :meth:`get\*` methods can only be called after</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_137">137</td><td nowrap="nowrap">the corresponding :meth:`set\*` methods have been called. Before the first</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_138">138</td><td nowrap="nowrap">:meth:`writeframes` or :meth:`writeframesraw`, all parameters except for the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_139">139</td><td nowrap="nowrap">number of frames must be filled in.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_140">140</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_141">141</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from64_142">142</td><td nowrap="nowrap">.. method:: aifc.aiff()</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/anydbm.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,75 @@ +--- r262/library/anydbm.rst 2008-05-26 19:22:15.521722000 +0900 ++++ r266/library/anydbm.rst 2009-10-27 23:36:50.397095000 +0900 +@@ -18,46 +18,60 @@ + module: dumbdbm + + :mod:`anydbm` is a generic interface to variants of the DBM database --- + :mod:`dbhash` (requires :mod:`bsddb`), :mod:`gdbm`, or :mod:`dbm`. If none of + these modules is installed, the slow-but-simple implementation in module + :mod:`dumbdbm` will be used. + + + .. function:: open(filename[, flag[, mode]]) + + Open the database file *filename* and return a corresponding object. + +- If the database file already exists, the :mod:`whichdb` module is used to +- determine its type and the appropriate module is used; if it does not exist, the +- first module listed above that can be imported is used. +- +- The optional *flag* argument can be ``'r'`` to open an existing database for +- reading only, ``'w'`` to open an existing database for reading and writing, +- ``'c'`` to create the database if it doesn't exist, or ``'n'``, which will +- always create a new empty database. If not specified, the default value is +- ``'r'``. ++ If the database file already exists, the :mod:`whichdb` module is used to ++ determine its type and the appropriate module is used; if it does not exist, ++ the first module listed above that can be imported is used. ++ ++ The optional *flag* argument must be one of these values: ++ ++ +---------+-------------------------------------------+ ++ | Value | Meaning | ++ +=========+===========================================+ ++ | ``'r'`` | Open existing database for reading only | ++ | | (default) | ++ +---------+-------------------------------------------+ ++ | ``'w'`` | Open existing database for reading and | ++ | | writing | ++ +---------+-------------------------------------------+ ++ | ``'c'`` | Open database for reading and writing, | ++ | | creating it if it doesn't exist | ++ +---------+-------------------------------------------+ ++ | ``'n'`` | Always create a new, empty database, open | ++ | | for reading and writing | ++ +---------+-------------------------------------------+ ++ ++ If not specified, the default value is ``'r'``. + + The optional *mode* argument is the Unix mode of the file, used only when the +- database has to be created. It defaults to octal ``0666`` (and will be modified +- by the prevailing umask). ++ database has to be created. It defaults to octal ``0666`` (and will be ++ modified by the prevailing umask). + + + .. exception:: error + + A tuple containing the exceptions that can be raised by each of the supported + modules, with a unique exception also named :exc:`anydbm.error` as the first + item --- the latter is used when :exc:`anydbm.error` is raised. + +-The object returned by :func:`open` supports most of the same functionality as ++The object returned by :func:`.open` supports most of the same functionality as + dictionaries; keys and their corresponding values can be stored, retrieved, and + deleted, and the :meth:`has_key` and :meth:`keys` methods are available. Keys + and values must always be strings. + + The following example records some hostnames and a corresponding title, and + then prints out the contents of the database:: + + import anydbm + + # Open database, creating it if necessary. + db = anydbm.open('cache', 'c') + ======================================= --- /dev/null +++ /library/diff/anydbm.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,84 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to65__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/anydbm.rst => r266/library/anydbm.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to65__0"></td><td class="diff_header" id="from65_22">22</td><td nowrap="nowrap">these modules is installed, the slow-but-simple implementation in module</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_23">23</td><td nowrap="nowrap">:mod:`dumbdbm` will be used.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_24">24</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_25">25</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to65__1"></td><td class="diff_header" id="from65_26">26</td><td nowrap="nowrap">.. function:: open(filename[, flag[, mode]])</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_27">27</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_28">28</td><td nowrap="nowrap"> Open the database file *filename* and return a corresponding object.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_29">29</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to65__1">n</a></td><td class="diff_header" id="from65_30">30-</td><td nowrap="nowrap"> If the database file already exists, the :mod:`whichdb` module is<span class="diff_sub"> </span> used to</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to65__1">n</a></td><td class="diff_header" id="to65_30">30+</td><td nowrap="nowrap"> If the database file already exists, the :mod:`whichdb` module is used to</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from65_31">31-</td><td nowrap="nowrap"> determine its type and the appropriate module is used; if it does not exist,<span class="diff_sub"> the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_31">31+</td><td nowrap="nowrap"> determine its type and the appropriate module is used; if it does not exist,</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from65_32">32-</td><td nowrap="nowrap"> first module listed above that can be imported is used.</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_32">32+</td><td nowrap="nowrap"> <span class="diff_add"> the</span> first module listed above that can be imported is used.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from65_33">33</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to65__2">n</a></td><td class="diff_header" id="from65_34">34-</td><td nowrap="nowrap"><span class="diff_sub"> The optional *flag* argument can be ``'r'`` to open an existing database for</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to65__2">n</a></td><td class="diff_header" id="to65_34">34+</td><td nowrap="nowrap"><span class="diff_add"> The optional *flag* argument must be one of these values:</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from65_35">35-</td><td nowrap="nowrap"><span class="diff_sub"> reading only, ``'w'`` to open an existing database for reading and writing,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_35">35+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from65_36">36-</td><td nowrap="nowrap"><span class="diff_sub"> ``'c'`` to create the database if it doesn't exist, or ``'n'``, which will</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_36">36+</td><td nowrap="nowrap"><span class="diff_add"> +---------+-------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from65_37">37-</td><td nowrap="nowrap"><span class="diff_sub"> always create a new empty database. If not specified, the default value is</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_37">37+</td><td nowrap="nowrap"><span class="diff_add"> | Value | Meaning | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from65_38">38-</td><td nowrap="nowrap"><span class="diff_sub"> ``'r'``.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_38">38+</td><td nowrap="nowrap"><span class="diff_add"> +=========+===========================================+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_39">39+</td><td nowrap="nowrap"><span class="diff_add"> | ``'r'`` | Open existing database for reading only | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_40">40+</td><td nowrap="nowrap"><span class="diff_add"> | | (default) | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_41">41+</td><td nowrap="nowrap"><span class="diff_add"> +---------+-------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_42">42+</td><td nowrap="nowrap"><span class="diff_add"> | ``'w'`` | Open existing database for reading and | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_43">43+</td><td nowrap="nowrap"><span class="diff_add"> | | writing | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_44">44+</td><td nowrap="nowrap"><span class="diff_add"> +---------+-------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_45">45+</td><td nowrap="nowrap"><span class="diff_add"> | ``'c'`` | Open database for reading and writing, | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_46">46+</td><td nowrap="nowrap"><span class="diff_add"> | | creating it if it doesn't exist | </span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to65__2"></td><td class="diff_header" id="to65_47">47+</td><td nowrap="nowrap"><span class="diff_add"> +---------+-------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_48">48+</td><td nowrap="nowrap"><span class="diff_add"> | ``'n'`` | Always create a new, empty database, open | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_49">49+</td><td nowrap="nowrap"><span class="diff_add"> | | for reading and writing | </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_50">50+</td><td nowrap="nowrap"><span class="diff_add"> +---------+-------------------------------------------+</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_51">51+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_52">52+</td><td nowrap="nowrap"><span class="diff_add"> If not specified, the default value is ``'r'``.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from65_39">39</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_40">40</td><td nowrap="nowrap"> The optional *mode* argument is the Unix mode of the file, used only when the</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to65__3">n</a></td><td class="diff_header" id="from65_41">41-</td><td nowrap="nowrap"> database has to be created. It defaults to octal ``0666`` (and will be<span class="diff_sub"> modified</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to65__3">n</a></td><td class="diff_header" id="to65_55">55+</td><td nowrap="nowrap"> database has to be created. It defaults to octal ``0666`` (and will be</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from65_42">42-</td><td nowrap="nowrap"> by the prevailing umask).</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to65_56">56+</td><td nowrap="nowrap"> <span class="diff_add"> modified</span> by the prevailing umask).</td></tr> + <tr><td class="diff_next" id="difflib_chg_to65__3"></td><td class="diff_header" id="from65_43">43</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_44">44</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_45">45</td><td nowrap="nowrap">.. exception:: error</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_46">46</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_47">47</td><td nowrap="nowrap"> A tuple containing the exceptions that can be raised by each of the supported</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_48">48</td><td nowrap="nowrap"> modules, with a unique exception also named :exc:`anydbm.error` as the first</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_49">49</td><td nowrap="nowrap"> item --- the latter is used when :exc:`anydbm.error` is raised.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_50">50</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to65__top">t</a></td><td class="diff_header" id="from65_51">51-</td><td nowrap="nowrap">The object returned by :func:`open` supports most of the same functionality as</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to65__top">t</a></td><td class="diff_header" id="to65_65">65+</td><td nowrap="nowrap">The object returned by :func:`<span class="diff_add">.</span>open` supports most of the same functionality as</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from65_52">52</td><td nowrap="nowrap">dictionaries; keys and their corresponding values can be stored, retrieved, and</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_53">53</td><td nowrap="nowrap">deleted, and the :meth:`has_key` and :meth:`keys` methods are available. Keys</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_54">54</td><td nowrap="nowrap">and values must always be strings.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_55">55</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_56">56</td><td nowrap="nowrap">The following example records some hostnames and a corresponding title, and</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_57">57</td><td nowrap="nowrap">then prints out the contents of the database::</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_58">58</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from65_59">59</td><td nowrap="nowrap"> import anydbm</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/array.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,93 @@ +--- r262/library/array.rst 2008-03-29 20:46:18.031238000 +0900 ++++ r266/library/array.rst 2009-10-27 23:29:22.069083000 +0900 +@@ -15,81 +15,85 @@ + :dfn:`type code`, which is a single character. The following type codes are + defined: + + +-----------+----------------+-------------------+-----------------------+ + | Type code | C Type | Python Type | Minimum size in bytes | + +===========+================+===================+=======================+ + | ``'c'`` | char | character | 1 | + +-----------+----------------+-------------------+-----------------------+ + | ``'b'`` | signed char | int | 1 | + +-----------+----------------+-------------------+-----------------------+ + | ``'B'`` | unsigned char | int | 1 | + +-----------+----------------+-------------------+-----------------------+ +-| ``'u'`` | Py_UNICODE | Unicode character | 2 | ++| ``'u'`` | Py_UNICODE | Unicode character | 2 (see note) | + +-----------+----------------+-------------------+-----------------------+ + | ``'h'`` | signed short | int | 2 | + +-----------+----------------+-------------------+-----------------------+ + | ``'H'`` | unsigned short | int | 2 | + +-----------+----------------+-------------------+-----------------------+ + | ``'i'`` | signed int | int | 2 | + +-----------+----------------+-------------------+-----------------------+ + | ``'I'`` | unsigned int | long | 2 | + +-----------+----------------+-------------------+-----------------------+ + | ``'l'`` | signed long | int | 4 | + +-----------+----------------+-------------------+-----------------------+ + | ``'L'`` | unsigned long | long | 4 | + +-----------+----------------+-------------------+-----------------------+ + | ``'f'`` | float | float | 4 | + +-----------+----------------+-------------------+-----------------------+ + | ``'d'`` | double | float | 8 | + +-----------+----------------+-------------------+-----------------------+ + ++.. note:: ++ ++ The ``'u'`` typecode corresponds to Python's unicode character. On narrow ++ Unicode builds this is 2-bytes, on wide builds this is 4-bytes. ++ + The actual representation of values is determined by the machine architecture + (strictly speaking, by the C implementation). The actual size can be accessed + through the :attr:`itemsize` attribute. The values stored for ``'L'`` and + ``'I'`` items will be represented as Python long integers when retrieved, + because Python's plain integer type cannot represent the full range of C's + unsigned (long) integers. + + The module defines the following type: + + +-.. function:: array(typecode[, initializer]) ++.. class:: array(typecode[, initializer]) + +- Return a new array whose items are restricted by *typecode*, and initialized ++ A new array whose items are restricted by *typecode*, and initialized + from the optional *initializer* value, which must be a list, string, or iterable + over elements of the appropriate type. + + .. versionchanged:: 2.4 + Formerly, only lists or strings were accepted. + + If given a list or string, the initializer is passed to the new array's + :meth:`fromlist`, :meth:`fromstring`, or :meth:`fromunicode` method (see below) + to add initial items to the array. Otherwise, the iterable initializer is + passed to the :meth:`extend` method. + + + .. data:: ArrayType + +- Obsolete alias for :func:`array`. ++ Obsolete alias for :class:`array`. + + Array objects support the ordinary sequence operations of indexing, slicing, + concatenation, and multiplication. When using slice assignment, the assigned + value must be an array object with the same type code; in all other cases, + :exc:`TypeError` is raised. Array objects also implement the buffer interface, + and may be used wherever buffer objects are supported. + + The following data items and methods are also supported: + +- + .. attribute:: array.typecode + + The typecode character used to create the array. + + + .. attribute:: array.itemsize + + The length in bytes of one array item in the internal representation. + + + .. method:: array.append(x) + ======================================= --- /dev/null +++ /library/diff/array.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,64 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to66__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/array.rst => r266/library/array.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to66__0"></td><td class="diff_header" id="from66_19">19</td><td nowrap="nowrap">| Type code | C Type | Python Type | Minimum size in bytes |</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_20">20</td><td nowrap="nowrap">+===========+================+===================+=======================+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_21">21</td><td nowrap="nowrap">| ``'c'`` | char | character | 1 | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_22">22</td><td nowrap="nowrap">+-----------+----------------+-------------------+-----------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_23">23</td><td nowrap="nowrap">| ``'b'`` | signed char | int | 1 | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_24">24</td><td nowrap="nowrap">+-----------+----------------+-------------------+-----------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_25">25</td><td nowrap="nowrap">| ``'B'`` | unsigned char | int | 1 | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_26">26</td><td nowrap="nowrap">+-----------+----------------+-------------------+-----------------------+</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to66__1">n</a></td><td class="diff_header" id="from66_27">27-</td><td nowrap="nowrap">| ``'u'`` | Py_UNICODE | Unicode character | 2 <span class="diff_chg"> </span> | </td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to66__1">n</a></td><td class="diff_header" id="to66_27">27+</td><td nowrap="nowrap">| ``'u'`` | Py_UNICODE | Unicode character | 2 <span class="diff_chg">(see note)</span> | </td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from66_28">28</td><td nowrap="nowrap">+-----------+----------------+-------------------+-----------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_29">29</td><td nowrap="nowrap">| ``'h'`` | signed short | int | 2 | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_30">30</td><td nowrap="nowrap">+-----------+----------------+-------------------+-----------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_31">31</td><td nowrap="nowrap">| ``'H'`` | unsigned short | int | 2 | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_32">32</td><td nowrap="nowrap">+-----------+----------------+-------------------+-----------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_33">33</td><td nowrap="nowrap">| ``'i'`` | signed int | int | 2 | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_34">34</td><td nowrap="nowrap">+-----------+----------------+-------------------+-----------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_35">35</td><td nowrap="nowrap">| ``'I'`` | unsigned int | long | 2 | </td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to66__1"></td><td class="diff_header" id="from66_37">37</td><td nowrap="nowrap">| ``'l'`` | signed long | int | 4 | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_38">38</td><td nowrap="nowrap">+-----------+----------------+-------------------+-----------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_39">39</td><td nowrap="nowrap">| ``'L'`` | unsigned long | long | 4 | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_40">40</td><td nowrap="nowrap">+-----------+----------------+-------------------+-----------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_41">41</td><td nowrap="nowrap">| ``'f'`` | float | float | 4 | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_42">42</td><td nowrap="nowrap">+-----------+----------------+-------------------+-----------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_43">43</td><td nowrap="nowrap">| ``'d'`` | double | float | 8 | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_44">44</td><td nowrap="nowrap">+-----------+----------------+-------------------+-----------------------+</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to66__2">n</a></td><td class="diff_header" id="to66_45">45+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to66_46">46+</td><td nowrap="nowrap"><span class="diff_add">.. note::</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to66_47">47+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to66_48">48+</td><td nowrap="nowrap"><span class="diff_add"> The ``'u'`` typecode corresponds to Python's unicode character. On narrow</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to66_49">49+</td><td nowrap="nowrap"><span class="diff_add"> Unicode builds this is 2-bytes, on wide builds this is 4-bytes.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from66_45">45</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_46">46</td><td nowrap="nowrap">The actual representation of values is determined by the machine architecture</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_47">47</td><td nowrap="nowrap">(strictly speaking, by the C implementation). The actual size can be accessed</td></tr> <tr><td class="diff_next" id="difflib_chg_to66__2"></td><td class="diff_header" id="from66_48">48</td><td nowrap="nowrap">through the :attr:`itemsize` attribute. The values stored for ``'L'`` and</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_49">49</td><td nowrap="nowrap">``'I'`` items will be represented as Python long integers when retrieved,</td></tr> <tr><td class="diff_next" id="difflib_chg_to66__3"></td><td class="diff_header" id="from66_50">50</td><td nowrap="nowrap">because Python's plain integer type cannot represent the full range of C's</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_51">51</td><td nowrap="nowrap">unsigned (long) integers.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_52">52</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_53">53</td><td nowrap="nowrap">The module defines the following type:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_54">54</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_55">55</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to66__3">n</a></td><td class="diff_header" id="from66_56">56-</td><td nowrap="nowrap">.. <span class="diff_sub">fun</span>c<span class="diff_chg">tion</span>:: array(typecode[, initializer])</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to66__3">n</a></td><td class="diff_header" id="to66_61">61+</td><td nowrap="nowrap">.. c<span class="diff_chg">lass</span>:: array(typecode[, initializer])</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from66_57">57</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to66__4">n</a></td><td class="diff_header" id="from66_58">58-</td><td nowrap="nowrap"> <span class="diff_chg">Return a</span> new array whose items are restricted by *typecode*, and initialized</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to66__4">n</a></td><td class="diff_header" id="to66_63">63+</td><td nowrap="nowrap"> <span class="diff_chg">A</span> new array whose items are restricted by *typecode*, and initialized</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from66_59">59</td><td nowrap="nowrap"> from the optional *initializer* value, which must be a list, string, or iterable</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_60">60</td><td nowrap="nowrap"> over elements of the appropriate type.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_61">61</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_62">62</td><td nowrap="nowrap"> .. versionchanged:: 2.4</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_63">63</td><td nowrap="nowrap"> Formerly, only lists or strings were accepted.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_64">64</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to66__4"></td><td class="diff_header" id="from66_65">65</td><td nowrap="nowrap"> If given a list or string, the initializer is passed to the new array's</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_66">66</td><td nowrap="nowrap"> :meth:`fromlist`, :meth:`fromstring`, or :meth:`fromunicode` method (see below)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_67">67</td><td nowrap="nowrap"> to add initial items to the array. Otherwise, the iterable initializer is</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_68">68</td><td nowrap="nowrap"> passed to the :meth:`extend` method.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_69">69</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_70">70</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_71">71</td><td nowrap="nowrap">.. data:: ArrayType</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_72">72</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to66__5">n</a></td><td class="diff_header" id="from66_73">73-</td><td nowrap="nowrap"> Obsolete alias for :<span class="diff_sub">fun</span>c:`array`.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to66__5">n</a></td><td class="diff_header" id="to66_78">78+</td><td nowrap="nowrap"> Obsolete alias for :c<span class="diff_add">lass</span>:`array`.</td></tr> + <tr><td class="diff_next" id="difflib_chg_to66__5"></td><td class="diff_header" id="from66_74">74</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_75">75</td><td nowrap="nowrap">Array objects support the ordinary sequence operations of indexing, slicing,</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_76">76</td><td nowrap="nowrap">concatenation, and multiplication. When using slice assignment, the assigned</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_77">77</td><td nowrap="nowrap">value must be an array object with the same type code; in all other cases,</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_78">78</td><td nowrap="nowrap">:exc:`TypeError` is raised. Array objects also implement the buffer interface,</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_79">79</td><td nowrap="nowrap">and may be used wherever buffer objects are supported.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_80">80</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_81">81</td><td nowrap="nowrap">The following data items and methods are also supported:</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to66__top">t</a></td><td class="diff_header" id="from66_82">82-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from66_83">83</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_84">84</td><td nowrap="nowrap">.. attribute:: array.typecode</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_85">85</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_86">86</td><td nowrap="nowrap"> The typecode character used to create the array.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_87">87</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_88">88</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_89">89</td><td nowrap="nowrap">.. attribute:: array.itemsize</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from66_90">90</td><td nowrap="nowrap"></td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/ast.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,29 @@ +--- r262/library/ast.rst 2009-02-02 17:27:16.400413000 +0900 ++++ r266/library/ast.rst 2009-10-27 23:37:48.900246000 +0900 +@@ -13,25 +13,25 @@ + The low-level ``_ast`` module containing only the node classes. + + .. versionadded:: 2.6 + The high-level ``ast`` module containing all helpers. + + + The :mod:`ast` module helps Python applications to process trees of the Python + abstract syntax grammar. The abstract syntax itself might change with each + Python release; this module helps to find out programmatically what the current + grammar looks like. + + An abstract syntax tree can be generated by passing :data:`ast.PyCF_ONLY_AST` as +-a flag to the :func:`compile` builtin function, or using the :func:`parse` ++a flag to the :func:`compile` built-in function, or using the :func:`parse` + helper provided in this module. The result will be a tree of objects whose + classes all inherit from :class:`ast.AST`. An abstract syntax tree can be + compiled into a Python code object using the built-in :func:`compile` function. + + + Node classes + ------------ + + .. class:: AST + + This is the base of all AST node classes. The actual node classes are + derived from the :file:`Parser/Python.asdl` file, which is reproduced ======================================= --- /dev/null +++ /library/diff/ast.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,50 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to67__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/ast.rst => r266/library/ast.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to67__0"></td><td class="diff_header" id="from67_17">17</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_18">18</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_19">19</td><td nowrap="nowrap">The :mod:`ast` module helps Python applications to process trees of the Python</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_20">20</td><td nowrap="nowrap">abstract syntax grammar. The abstract syntax itself might change with each</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_21">21</td><td nowrap="nowrap">Python release; this module helps to find out programmatically what the current</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_22">22</td><td nowrap="nowrap">grammar looks like.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_23">23</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_24">24</td><td nowrap="nowrap">An abstract syntax tree can be generated by passing :data:`ast.PyCF_ONLY_AST` as</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to67__top">t</a></td><td class="diff_header" id="from67_25">25-</td><td nowrap="nowrap">a flag to the :func:`compile` builtin function, or using the :func:`parse`</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to67__top">t</a></td><td class="diff_header" id="to67_25">25+</td><td nowrap="nowrap">a flag to the :func:`compile` built<span class="diff_add">-</span>in function, or using the :func:`parse`</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from67_26">26</td><td nowrap="nowrap">helper provided in this module. The result will be a tree of objects whose</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_27">27</td><td nowrap="nowrap">classes all inherit from :class:`ast.AST`. An abstract syntax tree can be</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_28">28</td><td nowrap="nowrap">compiled into a Python code object using the built-in :func:`compile` function.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_29">29</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_30">30</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_31">31</td><td nowrap="nowrap">Node classes</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_32">32</td><td nowrap="nowrap">------------</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from67_33">33</td><td nowrap="nowrap"></td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/asynchat.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,210 @@ +--- r262/library/asynchat.rst 2008-09-19 11:07:22.232433000 +0900 ++++ r266/library/asynchat.rst 2010-04-30 05:34:25.118070000 +0900 +@@ -72,197 +72,116 @@ + + Pushes a ``None`` on to the producer fifo. When this producer is popped off + the fifo it causes the channel to be closed. + + + .. method:: async_chat.collect_incoming_data(data) + + Called with *data* holding an arbitrary amount of received data. The + default method, which must be overridden, raises a + :exc:`NotImplementedError` exception. + + +-.. method:: async_chat._collect_incoming_data(data) +- +- Sample implementation of a data collection rutine to be used in conjunction +- with :meth:`_get_data` in a user-specified :meth:`found_terminator`. +- +- + .. method:: async_chat.discard_buffers() + + In emergencies this method will discard any data held in the input and/or + output buffers and the producer fifo. + + + .. method:: async_chat.found_terminator() + + Called when the incoming data stream matches the termination condition set + by :meth:`set_terminator`. The default method, which must be overridden, + raises a :exc:`NotImplementedError` exception. The buffered input data + should be available via an instance attribute. + + +-.. method:: async_chat._get_data() +- +- Will return and clear the data received with the sample +- :meth:`_collect_incoming_data` implementation. +- +- + .. method:: async_chat.get_terminator() + + Returns the current terminator for the channel. + + +-.. method:: async_chat.handle_close() +- +- Called when the channel is closed. The default method silently closes the +- channel's socket. +- +- +-.. method:: async_chat.handle_read() +- +- Called when a read event fires on the channel's socket in the asynchronous +- loop. The default method checks for the termination condition established +- by :meth:`set_terminator`, which can be either the appearance of a +- particular string in the input stream or the receipt of a particular number +- of characters. When the terminator is found, :meth:`handle_read` calls the +- :meth:`found_terminator` method after calling :meth:`collect_incoming_data` +- with any data preceding the terminating condition. +- +- +-.. method:: async_chat.handle_write() +- +- Called when the application may write data to the channel. The default +- method calls the :meth:`initiate_send` method, which in turn will call +- :meth:`refill_buffer` to collect data from the producer fifo associated +- with the channel. +- +- + .. method:: async_chat.push(data) + +- Creates a :class:`simple_producer` object (*see below*) containing the data +- and pushes it on to the channel's ``producer_fifo`` to ensure its +- transmission. This is all you need to do to have the channel write the +- data out to the network, although it is possible to use your own producers +- in more complex schemes to implement encryption and chunking, for example. ++ Pushes data on to the channel's fifo to ensure its transmission. ++ This is all you need to do to have the channel write the data out to the ++ network, although it is possible to use your own producers in more complex ++ schemes to implement encryption and chunking, for example. + + + .. method:: async_chat.push_with_producer(producer) + + Takes a producer object and adds it to the producer fifo associated with + the channel. When all currently-pushed producers have been exhausted the + channel will consume this producer's data by calling its :meth:`more` + method and send the data to the remote endpoint. + + +-.. method:: async_chat.readable() +- +- Should return ``True`` for the channel to be included in the set of +- channels tested by the :cfunc:`select` loop for readability. +- +- +-.. method:: async_chat.refill_buffer() +- +- Refills the output buffer by calling the :meth:`more` method of the +- producer at the head of the fifo. If it is exhausted then the producer is +- popped off the fifo and the next producer is activated. If the current +- producer is, or becomes, ``None`` then the channel is closed. +- +- + .. method:: async_chat.set_terminator(term) + + Sets the terminating condition to be recognized on the channel. ``term`` + may be any of three types of value, corresponding to three different ways + to handle incoming protocol data. + + +-----------+---------------------------------------------+ + | term | Description | + +===========+=============================================+ + | *string* | Will call :meth:`found_terminator` when the | + | | string is found in the input stream | + +-----------+---------------------------------------------+ + | *integer* | Will call :meth:`found_terminator` when the | + | | indicated number of characters have been | + | | received | + +-----------+---------------------------------------------+ + | ``None`` | The channel continues to collect data | + | | forever | + +-----------+---------------------------------------------+ + + Note that any data following the terminator will be available for reading + by the channel after :meth:`found_terminator` is called. + + +-.. method:: async_chat.writable() +- +- Should return ``True`` as long as items remain on the producer fifo, or the +- channel is connected and the channel's output buffer is non-empty. +- +- +-asynchat - Auxiliary Classes and Functions ++asynchat - Auxiliary Classes + ------------------------------------------ + +- +-.. class:: simple_producer(data[, buffer_size=512]) +- +- A :class:`simple_producer` takes a chunk of data and an optional buffer +- size. Repeated calls to its :meth:`more` method yield successive chunks of +- the data no larger than *buffer_size*. +- +- +- .. method:: more() +- +- Produces the next chunk of information from the producer, or returns the +- empty string. +- +- + .. class:: fifo([list=None]) + +- Each channel maintains a :class:`fifo` holding data which has been pushed +- by the application but not yet popped for writing to the channel. A +- :class:`fifo` is a list used to hold data and/or producers until they are +- required. If the *list* argument is provided then it should contain +- producers or data items to be written to the channel. ++ A :class:`fifo` holding data which has been pushed by the application but ++ not yet popped for writing to the channel. A :class:`fifo` is a list used ++ to hold data and/or producers until they are required. If the *list* ++ argument is provided then it should contain producers or data items to be ++ written to the channel. + + + .. method:: is_empty() + + Returns ``True`` if and only if the fifo is empty. + + + .. method:: first() + + Returns the least-recently :meth:`push`\ ed item from the fifo. + + + .. method:: push(data) + + Adds the given data (which may be a string or a producer object) to the + producer fifo. + + + .. method:: pop() + + If the fifo is not empty, returns ``True, first()``, deleting the popped + item. Returns ``False, None`` for an empty fifo. + +-The :mod:`asynchat` module also defines one utility function, which may be of +-use in network and textual analysis operations. +- +- +-.. function:: find_prefix_at_end(haystack, needle) +- +- Returns ``True`` if string *haystack* ends with any non-empty prefix of +- string *needle*. +- + + .. _asynchat-example: + + asynchat Example + ---------------- + + The following partial example shows how HTTP requests can be read with + :class:`async_chat`. A web server might create an + :class:`http_request_handler` object for each incoming client connection. + Notice that initially the channel terminator is set to match the blank line at + the end of the HTTP headers, and a flag indicates that the headers are being + read. ======================================= --- /dev/null +++ /library/diff/asynchat.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,153 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to68__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/asynchat.rst => r266/library/asynchat.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to68__0"></td><td class="diff_header" id="from68_76">76</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_77">77</td><td nowrap="nowrap">.. method:: async_chat.collect_incoming_data(data)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_78">78</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_79">79</td><td nowrap="nowrap"> Called with *data* holding an arbitrary amount of received data. The</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_80">80</td><td nowrap="nowrap"> default method, which must be overridden, raises a</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_81">81</td><td nowrap="nowrap"> :exc:`NotImplementedError` exception.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_82">82</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_83">83</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to68__1">n</a></td><td class="diff_header" id="from68_84">84-</td><td nowrap="nowrap"><span class="diff_sub">.. method:: async_chat._collect_incoming_data(data)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_85">85-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_86">86-</td><td nowrap="nowrap"><span class="diff_sub"> Sample implementation of a data collection rutine to be used in conjunction</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_87">87-</td><td nowrap="nowrap"><span class="diff_sub"> with :meth:`_get_data` in a user-specified :meth:`found_terminator`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_88">88-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_89">89-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from68_90">90</td><td nowrap="nowrap">.. method:: async_chat.discard_buffers()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_91">91</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_92">92</td><td nowrap="nowrap"> In emergencies this method will discard any data held in the input and/or</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_93">93</td><td nowrap="nowrap"> output buffers and the producer fifo.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_94">94</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_95">95</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to68__1"></td><td class="diff_header" id="from68_96">96</td><td nowrap="nowrap">.. method:: async_chat.found_terminator()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_97">97</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_98">98</td><td nowrap="nowrap"> Called when the incoming data stream matches the termination condition set</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_99">99</td><td nowrap="nowrap"> by :meth:`set_terminator`. The default method, which must be overridden,</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_100">100</td><td nowrap="nowrap"> raises a :exc:`NotImplementedError` exception. The buffered input data</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_101">101</td><td nowrap="nowrap"> should be available via an instance attribute.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_102">102</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_103">103</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to68__2">n</a></td><td class="diff_header" id="from68_104">104-</td><td nowrap="nowrap"><span class="diff_sub">.. method:: async_chat._get_data()</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_105">105-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_106">106-</td><td nowrap="nowrap"><span class="diff_sub"> Will return and clear the data received with the sample</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to68__2"></td><td class="diff_header" id="from68_107">107-</td><td nowrap="nowrap"><span class="diff_sub"> :meth:`_collect_incoming_data` implementation.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_108">108-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_109">109-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from68_110">110</td><td nowrap="nowrap">.. method:: async_chat.get_terminator()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_111">111</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_112">112</td><td nowrap="nowrap"> Returns the current terminator for the channel.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_113">113</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_114">114</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to68__3">n</a></td><td class="diff_header" id="from68_115">115-</td><td nowrap="nowrap"><span class="diff_sub">.. method:: async_chat.handle_close()</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_116">116-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_117">117-</td><td nowrap="nowrap"><span class="diff_sub"> Called when the channel is closed. The default method silently closes the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_118">118-</td><td nowrap="nowrap"><span class="diff_sub"> channel's socket.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_119">119-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_120">120-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_121">121-</td><td nowrap="nowrap"><span class="diff_sub">.. method:: async_chat.handle_read()</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_122">122-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_123">123-</td><td nowrap="nowrap"><span class="diff_sub"> Called when a read event fires on the channel's socket in the asynchronous</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_124">124-</td><td nowrap="nowrap"><span class="diff_sub"> loop. The default method checks for the termination condition established</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_125">125-</td><td nowrap="nowrap"><span class="diff_sub"> by :meth:`set_terminator`, which can be either the appearance of a</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_126">126-</td><td nowrap="nowrap"><span class="diff_sub"> particular string in the input stream or the receipt of a particular number</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_127">127-</td><td nowrap="nowrap"><span class="diff_sub"> of characters. When the terminator is found, :meth:`handle_read` calls the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_128">128-</td><td nowrap="nowrap"><span class="diff_sub"> :meth:`found_terminator` method after calling :meth:`collect_incoming_data`</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_129">129-</td><td nowrap="nowrap"><span class="diff_sub"> with any data preceding the terminating condition.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_130">130-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_131">131-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_132">132-</td><td nowrap="nowrap"><span class="diff_sub">.. method:: async_chat.handle_write()</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_133">133-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to68__3"></td><td class="diff_header" id="from68_134">134-</td><td nowrap="nowrap"><span class="diff_sub"> Called when the application may write data to the channel. The default</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_135">135-</td><td nowrap="nowrap"><span class="diff_sub"> method calls the :meth:`initiate_send` method, which in turn will call</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_136">136-</td><td nowrap="nowrap"><span class="diff_sub"> :meth:`refill_buffer` to collect data from the producer fifo associated</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_137">137-</td><td nowrap="nowrap"><span class="diff_sub"> with the channel.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_138">138-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_139">139-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from68_140">140</td><td nowrap="nowrap">.. method:: async_chat.push(data)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_141">141</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to68__4">n</a></td><td class="diff_header" id="from68_142">142-</td><td nowrap="nowrap"><span class="diff_sub"> Creates a :class:`simple_producer` object (*see below*) containing the data</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to68__4">n</a></td><td class="diff_header" id="to68_105">105+</td><td nowrap="nowrap"><span class="diff_add"> Pushes data on to the channel's fifo to ensure its transmission.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_143">143-</td><td nowrap="nowrap"><span class="diff_sub"> and pushes it on to the channel's ``producer_fifo`` to ensure its</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_144">144-</td><td nowrap="nowrap"> <span class="diff_sub"> transmission.</span> This is all you need to do to have the channel write the</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to68_106">106+</td><td nowrap="nowrap"> This is all you need to do to have the channel write the<span class="diff_add"> data out to the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_145">145-</td><td nowrap="nowrap"> <span class="diff_sub"> data out to the</span> network, although it is possible to use your own producers</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to68_107">107+</td><td nowrap="nowrap"> network, although it is possible to use your own producers<span class="diff_add"> in more complex</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_146">146-</td><td nowrap="nowrap"> <span class="diff_sub"> in more complex</span> schemes to implement encryption and chunking, for example.</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to68_108">108+</td><td nowrap="nowrap"> schemes to implement encryption and chunking, for example.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from68_147">147</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_148">148</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to68__4"></td><td class="diff_header" id="from68_149">149</td><td nowrap="nowrap">.. method:: async_chat.push_with_producer(producer)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_150">150</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_151">151</td><td nowrap="nowrap"> Takes a producer object and adds it to the producer fifo associated with</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_152">152</td><td nowrap="nowrap"> the channel. When all currently-pushed producers have been exhausted the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_153">153</td><td nowrap="nowrap"> channel will consume this producer's data by calling its :meth:`more`</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_154">154</td><td nowrap="nowrap"> method and send the data to the remote endpoint.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_155">155</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_156">156</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to68__5">n</a></td><td class="diff_header" id="from68_157">157-</td><td nowrap="nowrap"><span class="diff_sub">.. method:: async_chat.readable()</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_158">158-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_159">159-</td><td nowrap="nowrap"><span class="diff_sub"> Should return ``True`` for the channel to be included in the set of</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_160">160-</td><td nowrap="nowrap"><span class="diff_sub"> channels tested by the :cfunc:`select` loop for readability.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_161">161-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_162">162-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_163">163-</td><td nowrap="nowrap"><span class="diff_sub">.. method:: async_chat.refill_buffer()</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_164">164-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_165">165-</td><td nowrap="nowrap"><span class="diff_sub"> Refills the output buffer by calling the :meth:`more` method of the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_166">166-</td><td nowrap="nowrap"><span class="diff_sub"> producer at the head of the fifo. If it is exhausted then the producer is</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_167">167-</td><td nowrap="nowrap"><span class="diff_sub"> popped off the fifo and the next producer is activated. If the current</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_168">168-</td><td nowrap="nowrap"><span class="diff_sub"> producer is, or becomes, ``None`` then the channel is closed.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_169">169-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_170">170-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from68_171">171</td><td nowrap="nowrap">.. method:: async_chat.set_terminator(term)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_172">172</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_173">173</td><td nowrap="nowrap"> Sets the terminating condition to be recognized on the channel. ``term``</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_174">174</td><td nowrap="nowrap"> may be any of three types of value, corresponding to three different ways</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_175">175</td><td nowrap="nowrap"> to handle incoming protocol data.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_176">176</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_177">177</td><td nowrap="nowrap"> +-----------+---------------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_178">178</td><td nowrap="nowrap"> | term | Description | </td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to68__5"></td><td class="diff_header" id="from68_187">187</td><td nowrap="nowrap"> | ``None`` | The channel continues to collect data | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_188">188</td><td nowrap="nowrap"> | | forever | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_189">189</td><td nowrap="nowrap"> +-----------+---------------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_190">190</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_191">191</td><td nowrap="nowrap"> Note that any data following the terminator will be available for reading</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_192">192</td><td nowrap="nowrap"> by the channel after :meth:`found_terminator` is called.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_193">193</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_194">194</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to68__6">n</a></td><td class="diff_header" id="from68_195">195-</td><td nowrap="nowrap"><span class="diff_sub">.. method:: async_chat.writable()</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to68__6"></td><td class="diff_header" id="from68_196">196-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_197">197-</td><td nowrap="nowrap"><span class="diff_sub"> Should return ``True`` as long as items remain on the producer fifo, or the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_198">198-</td><td nowrap="nowrap"><span class="diff_sub"> channel is connected and the channel's output buffer is non-empty.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_199">199-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_200">200-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_201">201-</td><td nowrap="nowrap">asynchat - Auxiliary Classes<span class="diff_sub"> and Functions</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to68_143">143+</td><td nowrap="nowrap">asynchat - Auxiliary Classes</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from68_202">202</td><td nowrap="nowrap">------------------------------------------</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_203">203</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to68__7">n</a></td><td class="diff_header" id="from68_204">204-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_205">205-</td><td nowrap="nowrap"><span class="diff_sub">.. class:: simple_producer(data[, buffer_size=512])</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_206">206-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_207">207-</td><td nowrap="nowrap"><span class="diff_sub"> A :class:`simple_producer` takes a chunk of data and an optional buffer</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_208">208-</td><td nowrap="nowrap"><span class="diff_sub"> size. Repeated calls to its :meth:`more` method yield successive chunks of</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_209">209-</td><td nowrap="nowrap"><span class="diff_sub"> the data no larger than *buffer_size*.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_210">210-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_211">211-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to68__7"></td><td class="diff_header" id="from68_212">212-</td><td nowrap="nowrap"><span class="diff_sub"> .. method:: more()</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_213">213-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_214">214-</td><td nowrap="nowrap"><span class="diff_sub"> Produces the next chunk of information from the producer, or returns the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_215">215-</td><td nowrap="nowrap"><span class="diff_sub"> empty string.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_216">216-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_217">217-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from68_218">218</td><td nowrap="nowrap">.. class:: fifo([list=None])</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_219">219</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to68__8">n</a></td><td class="diff_header" id="from68_220">220-</td><td nowrap="nowrap"><span class="diff_sub"> Each channel maintains a :class:`fifo` holding data which has been pushed</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to68__8">n</a></td><td class="diff_header" id="to68_148">148+</td><td nowrap="nowrap"><span class="diff_add"> A :class:`fifo` holding data which has been pushed by the application but</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_221">221-</td><td nowrap="nowrap"><span class="diff_sub"> by the application but not yet popped for writing to the channel. A</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to68_149">149+</td><td nowrap="nowrap"><span class="diff_add"> not yet popped for writing to the channel. A :class:`fifo` is a list used</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_222">222-</td><td nowrap="nowrap"><span class="diff_sub"> :class:`fifo` is a list used to hold data and/or producers until they are</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to68_150">150+</td><td nowrap="nowrap"><span class="diff_add"> to hold data and/or producers until they are required. If the *list*</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_223">223-</td><td nowrap="nowrap"><span class="diff_sub"> required. If the *list* argument is provided then it should contain</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to68_151">151+</td><td nowrap="nowrap"><span class="diff_add"> argument is provided then it should contain producers or data items to be</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_224">224-</td><td nowrap="nowrap"><span class="diff_sub"> producers or data items to be written to the channel.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to68_152">152+</td><td nowrap="nowrap"><span class="diff_add"> written to the channel.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from68_225">225</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_226">226</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_227">227</td><td nowrap="nowrap"> .. method:: is_empty()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_228">228</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_229">229</td><td nowrap="nowrap"> Returns ``True`` if and only if the fifo is empty.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_230">230</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_231">231</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_232">232</td><td nowrap="nowrap"> .. method:: first()</td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to68__8"></td><td class="diff_header" id="from68_239">239</td><td nowrap="nowrap"> Adds the given data (which may be a string or a producer object) to the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_240">240</td><td nowrap="nowrap"> producer fifo.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_241">241</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_242">242</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_243">243</td><td nowrap="nowrap"> .. method:: pop()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_244">244</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_245">245</td><td nowrap="nowrap"> If the fifo is not empty, returns ``True, first()``, deleting the popped</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_246">246</td><td nowrap="nowrap"> item. Returns ``False, None`` for an empty fifo.</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to68__top">t</a></td><td class="diff_header" id="from68_247">247-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_248">248-</td><td nowrap="nowrap"><span class="diff_sub">The :mod:`asynchat` module also defines one utility function, which may be of</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_249">249-</td><td nowrap="nowrap"><span class="diff_sub">use in network and textual analysis operations.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_250">250-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_251">251-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_252">252-</td><td nowrap="nowrap"><span class="diff_sub">.. function:: find_prefix_at_end(haystack, needle)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_253">253-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_254">254-</td><td nowrap="nowrap"><span class="diff_sub"> Returns ``True`` if string *haystack* ends with any non-empty prefix of</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from68_255">255-</td><td nowrap="nowrap"><span class="diff_sub"> string *needle*.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from68_256">256</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_257">257</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_258">258</td><td nowrap="nowrap">.. _asynchat-example:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_259">259</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_260">260</td><td nowrap="nowrap">asynchat Example</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_261">261</td><td nowrap="nowrap">----------------</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_262">262</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from68_263">263</td><td nowrap="nowrap">The following partial example shows how HTTP requests can be read with</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/asyncore.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,58 @@ +--- r262/library/asyncore.rst 2008-06-10 22:53:24.449607000 +0900 ++++ r266/library/asyncore.rst 2010-05-19 23:14:45.010791000 +0900 +@@ -72,25 +72,26 @@ + + The firing of low-level events at certain times or in certain connection + states tells the asynchronous loop that certain higher-level events have + taken place. For example, if we have asked for a socket to connect to + another host, we know that the connection has been made when the socket + becomes writable for the first time (at this point you know that you may + write to it with the expectation of success). The implied higher-level + events are: + + +----------------------+----------------------------------------+ + | Event | Description | + +======================+========================================+ +- | ``handle_connect()`` | Implied by the first write event | ++ | ``handle_connect()`` | Implied by the first read or write | ++ | | event | + +----------------------+----------------------------------------+ + | ``handle_close()`` | Implied by a read event with no data | + | | available | + +----------------------+----------------------------------------+ + | ``handle_accept()`` | Implied by a read event on a listening | + | | socket | + +----------------------+----------------------------------------+ + + During asynchronous processing, each mapped channel's :meth:`readable` and + :meth:`writable` methods are used to determine whether the channel's socket + should be added to the list of channels :cfunc:`select`\ ed or + :cfunc:`poll`\ ed for read and write events. +@@ -192,25 +193,26 @@ + + + .. method:: listen(backlog) + + Listen for connections made to the socket. The *backlog* argument + specifies the maximum number of queued connections and should be at least + 1; the maximum value is system-dependent (usually 5). + + + .. method:: bind(address) + + Bind the socket to *address*. The socket must not already be bound. (The +- format of *address* depends on the address family --- see above.) To mark ++ format of *address* depends on the address family --- refer to the ++ :mod:`socket` documentation for more information.) To mark + the socket as re-usable (setting the :const:`SO_REUSEADDR` option), call + the :class:`dispatcher` object's :meth:`set_reuse_addr` method. + + + .. method:: accept() + + Accept a connection. The socket must be bound to an address and listening + for connections. The return value is a pair ``(conn, address)`` where + *conn* is a *new* socket object usable to send and receive data on the + connection, and *address* is the address bound to the socket on the other + end of the connection. + ======================================= --- /dev/null +++ /library/diff/asyncore.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,56 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to69__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/asyncore.rst => r266/library/asyncore.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to69__0"></td><td class="diff_header" id="from69_76">76</td><td nowrap="nowrap"> another host, we know that the connection has been made when the socket</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_77">77</td><td nowrap="nowrap"> becomes writable for the first time (at this point you know that you may</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_78">78</td><td nowrap="nowrap"> write to it with the expectation of success). The implied higher-level</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_79">79</td><td nowrap="nowrap"> events are:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_80">80</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_81">81</td><td nowrap="nowrap"> +----------------------+----------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_82">82</td><td nowrap="nowrap"> | Event | Description | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_83">83</td><td nowrap="nowrap"> +======================+========================================+</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to69__1">n</a></td><td class="diff_header" id="from69_84">84-</td><td nowrap="nowrap"> | ``handle_connect()`` | Implied by the first write <span class="diff_sub">event </span> | </td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to69__1">n</a></td><td class="diff_header" id="to69_84">84+</td><td nowrap="nowrap"> | ``handle_connect()`` | Implied by the first <span class="diff_add">read or </span>write | </td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to69_85">85+</td><td nowrap="nowrap"><span class="diff_add"> | | event | </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from69_85">85</td><td nowrap="nowrap"> +----------------------+----------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_86">86</td><td nowrap="nowrap"> | ``handle_close()`` | Implied by a read event with no data | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_87">87</td><td nowrap="nowrap"> | | available | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_88">88</td><td nowrap="nowrap"> +----------------------+----------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_89">89</td><td nowrap="nowrap"> | ``handle_accept()`` | Implied by a read event on a listening | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_90">90</td><td nowrap="nowrap"> | | socket | </td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_91">91</td><td nowrap="nowrap"> +----------------------+----------------------------------------+</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_92">92</td><td nowrap="nowrap"></td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to69__1"></td><td class="diff_header" id="from69_196">196</td><td nowrap="nowrap"> Listen for connections made to the socket. The *backlog* argument</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_197">197</td><td nowrap="nowrap"> specifies the maximum number of queued connections and should be at least</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_198">198</td><td nowrap="nowrap"> 1; the maximum value is system-dependent (usually 5).</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_199">199</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_200">200</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_201">201</td><td nowrap="nowrap"> .. method:: bind(address)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_202">202</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_203">203</td><td nowrap="nowrap"> Bind the socket to *address*. The socket must not already be bound. (The</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to69__top">t</a></td><td class="diff_header" id="from69_204">204-</td><td nowrap="nowrap"> format of *address* depends on the address family --- <span class="diff_chg">s</span>ee<span class="diff_chg"> ab</span>o<span class="diff_chg">v</span>e<span class="diff_sub">.) To mark</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to69__top">t</a></td><td class="diff_header" id="to69_205">205+</td><td nowrap="nowrap"> format of *address* depends on the address family --- <span class="diff_chg">r</span>e<span class="diff_add">f</span>e<span class="diff_chg">r t</span>o<span class="diff_chg"> th</span>e</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to69_206">206+</td><td nowrap="nowrap"><span class="diff_add"> :mod:`socket` documentation for more information.) To mark</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from69_205">205</td><td nowrap="nowrap"> the socket as re-usable (setting the :const:`SO_REUSEADDR` option), call</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_206">206</td><td nowrap="nowrap"> the :class:`dispatcher` object's :meth:`set_reuse_addr` method.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_207">207</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_208">208</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_209">209</td><td nowrap="nowrap"> .. method:: accept()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_210">210</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_211">211</td><td nowrap="nowrap"> Accept a connection. The socket must be bound to an address and listening</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from69_212">212</td><td nowrap="nowrap"> for connections. The return value is a pair ``(conn, address)`` where</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/audioop.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,29 @@ +--- r262/library/audioop.rst 2009-01-04 06:55:17.853888000 +0900 ++++ r266/library/audioop.rst 2009-10-27 23:36:50.397095000 +0900 +@@ -219,25 +219,25 @@ + + Generate a stereo fragment from a mono fragment. Each pair of samples in the + stereo fragment are computed from the mono sample, whereby left channel samples + are multiplied by *lfactor* and right channel samples by *rfactor*. + + + .. function:: ulaw2lin(fragment, width) + + Convert sound fragments in u-LAW encoding to linearly encoded sound fragments. + u-LAW encoding always uses 8 bits samples, so *width* refers only to the sample + width of the output fragment here. + +-Note that operations such as :func:`mul` or :func:`max` make no distinction ++Note that operations such as :func:`.mul` or :func:`.max` make no distinction + between mono and stereo fragments, i.e. all samples are treated equal. If this + is a problem the stereo fragment should be split into two mono fragments first + and recombined later. Here is an example of how to do that:: + + def mul_stereo(sample, width, lfactor, rfactor): + lsample = audioop.tomono(sample, width, 1, 0) + rsample = audioop.tomono(sample, width, 0, 1) + lsample = audioop.mul(sample, width, lfactor) + rsample = audioop.mul(sample, width, rfactor) + lsample = audioop.tostereo(lsample, width, 1, 0) + rsample = audioop.tostereo(rsample, width, 0, 1) + return audioop.add(lsample, rsample, width) ======================================= --- /dev/null +++ /library/diff/audioop.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,50 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to70__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/audioop.rst => r266/library/audioop.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to70__0"></td><td class="diff_header" id="from70_223">223</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_224">224</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_225">225</td><td nowrap="nowrap">.. function:: ulaw2lin(fragment, width)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_226">226</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_227">227</td><td nowrap="nowrap"> Convert sound fragments in u-LAW encoding to linearly encoded sound fragments.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_228">228</td><td nowrap="nowrap"> u-LAW encoding always uses 8 bits samples, so *width* refers only to the sample</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_229">229</td><td nowrap="nowrap"> width of the output fragment here.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_230">230</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to70__top">t</a></td><td class="diff_header" id="from70_231">231-</td><td nowrap="nowrap">Note that operations such as :func:`mul` or :func:`max` make no distinction</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to70__top">t</a></td><td class="diff_header" id="to70_231">231+</td><td nowrap="nowrap">Note that operations such as :func:`<span class="diff_add">.</span>mul` or :func:`<span class="diff_add">.</span>max` make no distinction</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from70_232">232</td><td nowrap="nowrap">between mono and stereo fragments, i.e. all samples are treated equal. If this</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_233">233</td><td nowrap="nowrap">is a problem the stereo fragment should be split into two mono fragments first</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_234">234</td><td nowrap="nowrap">and recombined later. Here is an example of how to do that::</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_235">235</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_236">236</td><td nowrap="nowrap"> def mul_stereo(sample, width, lfactor, rfactor):</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_237">237</td><td nowrap="nowrap"> lsample = audioop.tomono(sample, width, 1, 0)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_238">238</td><td nowrap="nowrap"> rsample = audioop.tomono(sample, width, 0, 1)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from70_239">239</td><td nowrap="nowrap"> lsample = audioop.mul(sample, width, lfactor)</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/autogil.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,32 @@ +--- r262/library/autogil.rst 2008-09-28 10:51:36.575163000 +0900 ++++ r266/library/autogil.rst 2009-04-29 03:23:28.138007000 +0900 +@@ -4,27 +4,27 @@ + + .. module:: autoGIL + :platform: Mac + :synopsis: Global Interpreter Lock handling in event loops. + :deprecated: + .. moduleauthor:: Just van Rossum <just****@lette*****> + + + The :mod:`autoGIL` module provides a function :func:`installAutoGIL` that + automatically locks and unlocks Python's :term:`Global Interpreter Lock` when + running an event loop. + +-.. warning:: ++.. note:: + +- This module has been removed in 3.0. ++ This module has been removed in Python 3.x. + + + .. exception:: AutoGILError + + Raised if the observer callback cannot be installed, for example because the + current thread does not have a run loop. + + + .. function:: installAutoGIL() + + Install an observer callback in the event loop (CFRunLoop) for the current + thread, that will lock and unlock the Global Interpreter Lock (GIL) at ======================================= --- /dev/null +++ /library/diff/autogil.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,52 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to71__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/autogil.rst => r266/library/autogil.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to71__0"></td><td class="diff_header" id="from71_8">8</td><td nowrap="nowrap"> :deprecated:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from71_9">9</td><td nowrap="nowrap">.. moduleauthor:: Just van Rossum <just****@lette*****></td></tr> <tr><td class="diff_next" id="difflib_chg_to71__1"></td><td class="diff_header" id="from71_10">10</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from71_11">11</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from71_12">12</td><td nowrap="nowrap">The :mod:`autoGIL` module provides a function :func:`installAutoGIL` that</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from71_13">13</td><td nowrap="nowrap">automatically locks and unlocks Python's :term:`Global Interpreter Lock` when</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from71_14">14</td><td nowrap="nowrap">running an event loop.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from71_15">15</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to71__1">n</a></td><td class="diff_header" id="from71_16">16-</td><td nowrap="nowrap"><span class="diff_sub">.. warning::</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to71__1">n</a></td><td class="diff_header" id="to71_16">16+</td><td nowrap="nowrap"><span class="diff_add">.. note::</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from71_17">17</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to71__top">t</a></td><td class="diff_header" id="from71_18">18-</td><td nowrap="nowrap"> This module has been removed in 3.<span class="diff_chg">0</span>.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to71__top">t</a></td><td class="diff_header" id="to71_18">18+</td><td nowrap="nowrap"> This module has been removed in <span class="diff_add">Python </span>3.<span class="diff_chg">x</span>.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from71_19">19</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from71_20">20</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from71_21">21</td><td nowrap="nowrap">.. exception:: AutoGILError</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from71_22">22</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from71_23">23</td><td nowrap="nowrap"> Raised if the observer callback cannot be installed, for example because the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from71_24">24</td><td nowrap="nowrap"> current thread does not have a run loop.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from71_25">25</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from71_26">26</td><td nowrap="nowrap"></td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/bastion.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,29 @@ +--- r262/library/bastion.rst 2009-01-04 06:55:17.853888000 +0900 ++++ r266/library/bastion.rst 2009-04-29 03:23:28.138007000 +0900 +@@ -6,25 +6,25 @@ + :synopsis: Providing restricted access to objects. + :deprecated: + + .. deprecated:: 2.6 + The :mod:`Bastion` module has been removed in Python 3.0. + + .. moduleauthor:: Barry Warsaw <bwars****@pytho*****> + + + .. versionchanged:: 2.3 + Disabled module. + +-.. warning:: ++.. note:: + + The documentation has been left in place to help in reading old code that uses + the module. + + According to the dictionary, a bastion is "a fortified area or position", or + "something that is considered a stronghold." It's a suitable name for this + module, which provides a way to forbid access to certain attributes of an + object. It must always be used with the :mod:`rexec` module, in order to allow + restricted-mode programs access to certain safe attributes of an object, while + denying access to other, unsafe attributes. + + .. I'm concerned that the word 'bastion' won't be understood by people ======================================= --- /dev/null +++ /library/diff/bastion.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,50 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to72__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/bastion.rst => r266/library/bastion.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to72__0"></td><td class="diff_header" id="from72_10">10</td><td nowrap="nowrap"> The :mod:`Bastion` module has been removed in Python 3.0.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_11">11</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_12">12</td><td nowrap="nowrap">.. moduleauthor:: Barry Warsaw <bwars****@pytho*****></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_13">13</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_14">14</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_15">15</td><td nowrap="nowrap">.. versionchanged:: 2.3</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_16">16</td><td nowrap="nowrap"> Disabled module.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_17">17</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to72__top">t</a></td><td class="diff_header" id="from72_18">18-</td><td nowrap="nowrap"><span class="diff_sub">.. warning::</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to72__top">t</a></td><td class="diff_header" id="to72_18">18+</td><td nowrap="nowrap"><span class="diff_add">.. note::</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from72_19">19</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_20">20</td><td nowrap="nowrap"> The documentation has been left in place to help in reading old code that uses</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_21">21</td><td nowrap="nowrap"> the module.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_22">22</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_23">23</td><td nowrap="nowrap">According to the dictionary, a bastion is "a fortified area or position", or</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_24">24</td><td nowrap="nowrap">"something that is considered a stronghold." It's a suitable name for this</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_25">25</td><td nowrap="nowrap">module, which provides a way to forbid access to certain attributes of an</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from72_26">26</td><td nowrap="nowrap">object. It must always be used with the :mod:`rexec` module, in order to allow</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/bdb.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,45 @@ +--- r262/library/bdb.rst 2009-01-04 06:55:17.853888000 +0900 ++++ r266/library/bdb.rst 2009-10-27 23:59:26.886697000 +0900 +@@ -53,32 +53,40 @@ + .. method:: pprint([out]) + + Print all the information about the breakpoint: + + * The breakpoint number. + * If it is temporary or not. + * Its file,line position. + * The condition that causes a break. + * If it must be ignored the next N times. + * The breakpoint hit count. + + +-.. class:: Bdb() ++.. class:: Bdb(skip=None) + +- The :class:`Bdb` acts as a generic Python debugger base class. ++ The :class:`Bdb` class acts as a generic Python debugger base class. + + This class takes care of the details of the trace facility; a derived class + should implement user interaction. The standard debugger class + (:class:`pdb.Pdb`) is an example. + ++ The *skip* argument, if given, must be an iterable of glob-style ++ module name patterns. The debugger will not step into frames that ++ originate in a module that matches one of these patterns. Whether a ++ frame is considered to originate in a certain module is determined ++ by the ``__name__`` in the frame globals. ++ ++ .. versionadded:: 2.7 ++ The *skip* argument. + + The following methods of :class:`Bdb` normally don't need to be overridden. + + .. method:: canonic(filename) + + Auxiliary method for getting a filename in a canonical form, that is, as a + case-normalized (on case-insensitive filesystems) absolute path, stripped + of surrounding angle brackets. + + .. method:: reset() + + Set the :attr:`botframe`, :attr:`stopframe`, :attr:`returnframe` and ======================================= --- /dev/null +++ /library/diff/bdb.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,60 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to73__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/bdb.rst => r266/library/bdb.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to73__0"></td><td class="diff_header" id="from73_57">57</td><td nowrap="nowrap"> * The breakpoint number.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_58">58</td><td nowrap="nowrap"> * If it is temporary or not.</td></tr> <tr><td class="diff_next" id="difflib_chg_to73__1"></td><td class="diff_header" id="from73_59">59</td><td nowrap="nowrap"> * Its file,line position.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_60">60</td><td nowrap="nowrap"> * The condition that causes a break.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_61">61</td><td nowrap="nowrap"> * If it must be ignored the next N times.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_62">62</td><td nowrap="nowrap"> * The breakpoint hit count.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_63">63</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_64">64</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next" id="difflib_chg_to73__2"><a href="#difflib_chg_to73__1">n</a></td><td class="diff_header" id="from73_65">65-</td><td nowrap="nowrap">.. class:: Bdb()</td></tr> +<tr><td class="diff_next" id="difflib_chg_to73__2"><a href="#difflib_chg_to73__1">n</a></td><td class="diff_header" id="to73_65">65+</td><td nowrap="nowrap">.. class:: Bdb(<span class="diff_add">skip=None</span>)</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from73_66">66</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to73__2">n</a></td><td class="diff_header" id="from73_67">67-</td><td nowrap="nowrap"> The :class:`Bdb` acts as a generic Python debugger base class.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to73__2">n</a></td><td class="diff_header" id="to73_67">67+</td><td nowrap="nowrap"> The :class:`Bdb` <span class="diff_add">class </span>acts as a generic Python debugger base class.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from73_68">68</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_69">69</td><td nowrap="nowrap"> This class takes care of the details of the trace facility; a derived class</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_70">70</td><td nowrap="nowrap"> should implement user interaction. The standard debugger class</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_71">71</td><td nowrap="nowrap"> (:class:`pdb.Pdb`) is an example.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_72">72</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to73__top">t</a></td><td class="diff_header" id="to73_73">73+</td><td nowrap="nowrap"><span class="diff_add"> The *skip* argument, if given, must be an iterable of glob-style</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to73_74">74+</td><td nowrap="nowrap"><span class="diff_add"> module name patterns. The debugger will not step into frames that</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to73_75">75+</td><td nowrap="nowrap"><span class="diff_add"> originate in a module that matches one of these patterns. Whether a</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to73_76">76+</td><td nowrap="nowrap"><span class="diff_add"> frame is considered to originate in a certain module is determined</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to73_77">77+</td><td nowrap="nowrap"><span class="diff_add"> by the ``__name__`` in the frame globals.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to73_78">78+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to73_79">79+</td><td nowrap="nowrap"><span class="diff_add"> .. versionadded:: 2.7</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to73_80">80+</td><td nowrap="nowrap"><span class="diff_add"> The *skip* argument.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from73_73">73</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_74">74</td><td nowrap="nowrap"> The following methods of :class:`Bdb` normally don't need to be overridden.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_75">75</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_76">76</td><td nowrap="nowrap"> .. method:: canonic(filename)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_77">77</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_78">78</td><td nowrap="nowrap"> Auxiliary method for getting a filename in a canonical form, that is, as a</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_79">79</td><td nowrap="nowrap"> case-normalized (on case-insensitive filesystems) absolute path, stripped</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from73_80">80</td><td nowrap="nowrap"> of surrounding angle brackets.</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/binhex.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,33 @@ +--- r262/library/binhex.rst 2008-09-14 02:41:16.853203000 +0900 ++++ r266/library/binhex.rst 2009-04-29 03:23:28.138007000 +0900 +@@ -1,28 +1,27 @@ +- + :mod:`binhex` --- Encode and decode binhex4 files + ================================================= + + .. module:: binhex + :synopsis: Encode and decode files in binhex4 format. + + + This module encodes and decodes files in binhex4 format, a format allowing + representation of Macintosh files in ASCII. On the Macintosh, both forks of a + file and the finder information are encoded (or decoded), on other platforms + only the data fork is handled. + +-.. warning:: ++.. note:: + +- In 3.0, special Macintosh support is removed. ++ In Python 3.x, special Macintosh support has been removed. + + + The :mod:`binhex` module defines the following functions: + + + .. function:: binhex(input, output) + + Convert a binary file with filename *input* to binhex file *output*. The + *output* parameter can either be a filename or a file-like object (any object + supporting a :meth:`write` and :meth:`close` method). + + ======================================= --- /dev/null +++ /library/diff/binhex.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,53 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to74__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/binhex.rst => r266/library/binhex.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to74__0"><a href="#difflib_chg_to74__1">n</a></td><td class="diff_header" id="from74_1">1-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from74_2">2</td><td nowrap="nowrap">:mod:`binhex` --- Encode and decode binhex4 files</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_3">3</td><td nowrap="nowrap">=================================================</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_4">4</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_5">5</td><td nowrap="nowrap">.. module:: binhex</td></tr> <tr><td class="diff_next" id="difflib_chg_to74__1"></td><td class="diff_header" id="from74_6">6</td><td nowrap="nowrap"> :synopsis: Encode and decode files in binhex4 format.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_7">7</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to74__2"></td><td class="diff_header" id="from74_8">8</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_9">9</td><td nowrap="nowrap">This module encodes and decodes files in binhex4 format, a format allowing</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_10">10</td><td nowrap="nowrap">representation of Macintosh files in ASCII. On the Macintosh, both forks of a</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_11">11</td><td nowrap="nowrap">file and the finder information are encoded (or decoded), on other platforms</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_12">12</td><td nowrap="nowrap">only the data fork is handled.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_13">13</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to74__2">n</a></td><td class="diff_header" id="from74_14">14-</td><td nowrap="nowrap"><span class="diff_sub">.. warning::</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to74__2">n</a></td><td class="diff_header" id="to74_13">13+</td><td nowrap="nowrap"><span class="diff_add">.. note::</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from74_15">15</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to74__top">t</a></td><td class="diff_header" id="from74_16">16-</td><td nowrap="nowrap"> In 3.<span class="diff_chg">0</span>, special Macintosh support <span class="diff_chg">i</span>s removed.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to74__top">t</a></td><td class="diff_header" id="to74_15">15+</td><td nowrap="nowrap"> In <span class="diff_add">Python </span>3.<span class="diff_chg">x</span>, special Macintosh support <span class="diff_chg">ha</span>s<span class="diff_add"> been</span> removed.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from74_17">17</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_18">18</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_19">19</td><td nowrap="nowrap">The :mod:`binhex` module defines the following functions:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_20">20</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_21">21</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_22">22</td><td nowrap="nowrap">.. function:: binhex(input, output)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_23">23</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from74_24">24</td><td nowrap="nowrap"> Convert a binary file with filename *input* to binhex file *output*. The</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/bisect.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,34 @@ +--- r262/library/bisect.rst 2008-03-23 07:04:10.557145000 +0900 ++++ r266/library/bisect.rst 2009-06-12 07:08:48.578001000 +0900 +@@ -76,13 +76,31 @@ + + >>> grades = "FEDCBA" + >>> breakpoints = [30, 44, 66, 75, 85] + >>> from bisect import bisect + >>> def grade(total): + ... return grades[bisect(breakpoints, total)] + ... + >>> grade(66) + 'C' + >>> map(grade, [33, 99, 77, 44, 12, 88]) + ['E', 'A', 'B', 'D', 'F', 'A'] + ++Unlike the :func:`sorted` function, it does not make sense for the :func:`bisect` ++functions to have *key* or *reversed* arguments because that would lead to an ++inefficent design (successive calls to bisect functions would not "remember" ++all of the previous key lookups). + ++Instead, it is better to search a list of precomputed keys to find the index ++of the record in question:: ++ ++ >>> data = [('red', 5), ('blue', 1), ('yellow', 8), ('black', 0)] ++ >>> data.sort(key=lambda r: r[1]) ++ >>> keys = [r[1] for r in data] # precomputed list of keys ++ >>> data[bisect_left(keys, 0)] ++ ('black', 0) ++ >>> data[bisect_left(keys, 1)] ++ ('blue', 1) ++ >>> data[bisect_left(keys, 5)] ++ ('red', 5) ++ >>> data[bisect_left(keys, 8)] ++ ('yellow', 8) ======================================= --- /dev/null +++ /library/diff/bisect.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,66 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to75__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/bisect.rst => r266/library/bisect.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to75__0"></td><td class="diff_header" id="from75_80">80</td><td nowrap="nowrap"> >>> def grade(total):</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from75_81">81</td><td nowrap="nowrap"> ... return grades[bisect(breakpoints, total)]</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from75_82">82</td><td nowrap="nowrap"> ...</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from75_83">83</td><td nowrap="nowrap"> >>> grade(66)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from75_84">84</td><td nowrap="nowrap"> 'C'</td></tr> <tr><td class="diff_next" id="difflib_chg_to75__1"></td><td class="diff_header" id="from75_85">85</td><td nowrap="nowrap"> >>> map(grade, [33, 99, 77, 44, 12, 88])</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from75_86">86</td><td nowrap="nowrap"> ['E', 'A', 'B', 'D', 'F', 'A']</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from75_87">87</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to75__1">n</a></td><td class="diff_header" id="to75_88">88+</td><td nowrap="nowrap"><span class="diff_add">Unlike the :func:`sorted` function, it does not make sense for the :func:`bisect`</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_89">89+</td><td nowrap="nowrap"><span class="diff_add">functions to have *key* or *reversed* arguments because that would lead to an</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_90">90+</td><td nowrap="nowrap"><span class="diff_add">inefficent design (successive calls to bisect functions would not "remember"</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_91">91+</td><td nowrap="nowrap"><span class="diff_add">all of the previous key lookups).</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from75_88">88</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to75__top">t</a></td><td class="diff_header" id="to75_93">93+</td><td nowrap="nowrap"><span class="diff_add">Instead, it is better to search a list of precomputed keys to find the index</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_94">94+</td><td nowrap="nowrap"><span class="diff_add">of the record in question::</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_95">95+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_96">96+</td><td nowrap="nowrap"><span class="diff_add"> >>> data = [('red', 5), ('blue', 1), ('yellow', 8), ('black', 0)]</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_97">97+</td><td nowrap="nowrap"><span class="diff_add"> >>> data.sort(key=lambda r: r[1])</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_98">98+</td><td nowrap="nowrap"><span class="diff_add"> >>> keys = [r[1] for r in data] # precomputed list of keys</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_99">99+</td><td nowrap="nowrap"><span class="diff_add"> >>> data[bisect_left(keys, 0)]</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_100">100+</td><td nowrap="nowrap"><span class="diff_add"> ('black', 0)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_101">101+</td><td nowrap="nowrap"><span class="diff_add"> >>> data[bisect_left(keys, 1)]</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_102">102+</td><td nowrap="nowrap"><span class="diff_add"> ('blue', 1)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_103">103+</td><td nowrap="nowrap"><span class="diff_add"> >>> data[bisect_left(keys, 5)]</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_104">104+</td><td nowrap="nowrap"><span class="diff_add"> ('red', 5)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_105">105+</td><td nowrap="nowrap"><span class="diff_add"> >>> data[bisect_left(keys, 8)]</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to75_106">106+</td><td nowrap="nowrap"><span class="diff_add"> ('yellow', 8)</span></td></tr> + </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/bz2.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,33 @@ +--- r262/library/bz2.rst 2009-01-04 06:55:17.853888000 +0900 ++++ r266/library/bz2.rst 2010-03-23 22:20:39.728857000 +0900 +@@ -11,27 +11,28 @@ + .. versionadded:: 2.3 + + This module provides a comprehensive interface for the bz2 compression library. + It implements a complete file interface, one-shot (de)compression functions, and + types for sequential (de)compression. + + For other archive formats, see the :mod:`gzip`, :mod:`zipfile`, and + :mod:`tarfile` modules. + + Here is a summary of the features offered by the bz2 module: + + * :class:`BZ2File` class implements a complete file interface, including +- :meth:`readline`, :meth:`readlines`, :meth:`writelines`, :meth:`seek`, etc; ++ :meth:`~BZ2File.readline`, :meth:`~BZ2File.readlines`, ++ :meth:`~BZ2File.writelines`, :meth:`~BZ2File.seek`, etc; + +-* :class:`BZ2File` class implements emulated :meth:`seek` support; ++* :class:`BZ2File` class implements emulated :meth:`~BZ2File.seek` support; + + * :class:`BZ2File` class implements universal newline support; + + * :class:`BZ2File` class offers an optimized line iteration using the readahead + algorithm borrowed from file objects; + + * Sequential (de)compression supported by :class:`BZ2Compressor` and + :class:`BZ2Decompressor` classes; + + * One-shot (de)compression supported by :func:`compress` and :func:`decompress` + functions; + ======================================= --- /dev/null +++ /library/diff/bz2.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,53 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to76__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/bz2.rst => r266/library/bz2.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to76__0"></td><td class="diff_header" id="from76_15">15</td><td nowrap="nowrap">types for sequential (de)compression.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from76_16">16</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from76_17">17</td><td nowrap="nowrap">For other archive formats, see the :mod:`gzip`, :mod:`zipfile`, and</td></tr> <tr><td class="diff_next" id="difflib_chg_to76__1"></td><td class="diff_header" id="from76_18">18</td><td nowrap="nowrap">:mod:`tarfile` modules.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from76_19">19</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from76_20">20</td><td nowrap="nowrap">Here is a summary of the features offered by the bz2 module:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from76_21">21</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from76_22">22</td><td nowrap="nowrap">* :class:`BZ2File` class implements a complete file interface, including</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to76__1">n</a></td><td class="diff_header" id="from76_23">23-</td><td nowrap="nowrap"><span class="diff_sub"> :meth:`readline`, :meth:`readlines`, :meth:`writelines`, :meth:`seek`, etc;</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to76__1">n</a></td><td class="diff_header" id="to76_23">23+</td><td nowrap="nowrap"><span class="diff_add"> :meth:`~BZ2File.readline`, :meth:`~BZ2File.readlines`,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to76_24">24+</td><td nowrap="nowrap"><span class="diff_add"> :meth:`~BZ2File.writelines`, :meth:`~BZ2File.seek`, etc;</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from76_24">24</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to76__top">t</a></td><td class="diff_header" id="from76_25">25-</td><td nowrap="nowrap">* :class:`BZ2File` class implements emulated :meth:`seek` support;</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to76__top">t</a></td><td class="diff_header" id="to76_26">26+</td><td nowrap="nowrap">* :class:`BZ2File` class implements emulated :meth:`<span class="diff_add">~BZ2File.</span>seek` support;</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from76_26">26</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from76_27">27</td><td nowrap="nowrap">* :class:`BZ2File` class implements universal newline support;</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from76_28">28</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from76_29">29</td><td nowrap="nowrap">* :class:`BZ2File` class offers an optimized line iteration using the readahead</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from76_30">30</td><td nowrap="nowrap"> algorithm borrowed from file objects;</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from76_31">31</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from76_32">32</td><td nowrap="nowrap">* Sequential (de)compression supported by :class:`BZ2Compressor` and</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from76_33">33</td><td nowrap="nowrap"> :class:`BZ2Decompressor` classes;</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/calendar.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,56 @@ +--- r262/library/calendar.rst 2008-05-16 18:47:29.513124000 +0900 ++++ r266/library/calendar.rst 2010-01-17 17:33:18.566333000 +0900 +@@ -120,25 +120,25 @@ + Return a month's calendar in a multi-line string. If *w* is provided, it + specifies the width of the date columns, which are centered. If *l* is + given, it specifies the number of lines that each week will use. Depends + on the first weekday as specified in the constructor or set by the + :meth:`setfirstweekday` method. + + + .. method:: prmonth(theyear, themonth[, w[, l]]) + + Print a month's calendar as returned by :meth:`formatmonth`. + + +- .. method:: formatyear(theyear, themonth[, w[, l[, c[, m]]]]) ++ .. method:: formatyear(theyear[, w[, l[, c[, m]]]]) + + Return a *m*-column calendar for an entire year as a multi-line string. + Optional parameters *w*, *l*, and *c* are for date column width, lines per + week, and number of spaces between month columns, respectively. Depends on + the first weekday as specified in the constructor or set by the + :meth:`setfirstweekday` method. The earliest year for which a calendar + can be generated is platform-dependent. + + + .. method:: pryear(theyear[, w[, l[, c[, m]]]]) + + Print the calendar for an entire year as returned by :meth:`formatyear`. +@@ -151,25 +151,25 @@ + .. versionadded:: 2.5 + + :class:`HTMLCalendar` instances have the following methods: + + + .. method:: formatmonth(theyear, themonth[, withyear]) + + Return a month's calendar as an HTML table. If *withyear* is true the year + will be included in the header, otherwise just the month name will be + used. + + +- .. method:: formatyear(theyear, themonth[, width]) ++ .. method:: formatyear(theyear[, width]) + + Return a year's calendar as an HTML table. *width* (defaulting to 3) + specifies the number of months per row. + + + .. method:: formatyearpage(theyear[, width[, css[, encoding]]]) + + Return a year's calendar as a complete HTML page. *width* (defaulting to + 3) specifies the number of months per row. *css* is the name for the + cascading style sheet to be used. :const:`None` can be passed if no style + sheet should be used. *encoding* specifies the encoding to be used for the + output (defaulting to the system default encoding). ======================================= --- /dev/null +++ /library/diff/calendar.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,54 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to77__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/calendar.rst => r266/library/calendar.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to77__0"></td><td class="diff_header" id="from77_124">124</td><td nowrap="nowrap"> :meth:`setfirstweekday` method.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_125">125</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_126">126</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_127">127</td><td nowrap="nowrap"> .. method:: prmonth(theyear, themonth[, w[, l]])</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_128">128</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_129">129</td><td nowrap="nowrap"> Print a month's calendar as returned by :meth:`formatmonth`.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_130">130</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_131">131</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to77__1">n</a></td><td class="diff_header" id="from77_132">132-</td><td nowrap="nowrap"> .. method:: formatyear(theyear<span class="diff_sub">, themonth</span>[, w[, l[, c[, m]]]])</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to77__1">n</a></td><td class="diff_header" id="to77_132">132+</td><td nowrap="nowrap"> .. method:: formatyear(theyear[, w[, l[, c[, m]]]])</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from77_133">133</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_134">134</td><td nowrap="nowrap"> Return a *m*-column calendar for an entire year as a multi-line string.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_135">135</td><td nowrap="nowrap"> Optional parameters *w*, *l*, and *c* are for date column width, lines per</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_136">136</td><td nowrap="nowrap"> week, and number of spaces between month columns, respectively. Depends on</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_137">137</td><td nowrap="nowrap"> the first weekday as specified in the constructor or set by the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_138">138</td><td nowrap="nowrap"> :meth:`setfirstweekday` method. The earliest year for which a calendar</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_139">139</td><td nowrap="nowrap"> can be generated is platform-dependent.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_140">140</td><td nowrap="nowrap"></td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to77__1"></td><td class="diff_header" id="from77_155">155</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_156">156</td><td nowrap="nowrap"> .. method:: formatmonth(theyear, themonth[, withyear])</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_157">157</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_158">158</td><td nowrap="nowrap"> Return a month's calendar as an HTML table. If *withyear* is true the year</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_159">159</td><td nowrap="nowrap"> will be included in the header, otherwise just the month name will be</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_160">160</td><td nowrap="nowrap"> used.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_161">161</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_162">162</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to77__top">t</a></td><td class="diff_header" id="from77_163">163-</td><td nowrap="nowrap"> .. method:: formatyear(theyear<span class="diff_sub">, themonth</span>[, width])</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to77__top">t</a></td><td class="diff_header" id="to77_163">163+</td><td nowrap="nowrap"> .. method:: formatyear(theyear[, width])</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from77_164">164</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_165">165</td><td nowrap="nowrap"> Return a year's calendar as an HTML table. *width* (defaulting to 3)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_166">166</td><td nowrap="nowrap"> specifies the number of months per row.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_167">167</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_168">168</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_169">169</td><td nowrap="nowrap"> .. method:: formatyearpage(theyear[, width[, css[, encoding]]])</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_170">170</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from77_171">171</td><td nowrap="nowrap"> Return a year's calendar as a complete HTML page. *width* (defaulting to</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/carbon.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,32 @@ +--- r262/library/carbon.rst 2009-03-31 01:03:41.796456000 +0900 ++++ r266/library/carbon.rst 2009-04-29 03:23:28.138007000 +0900 +@@ -13,27 +13,27 @@ + (callbacks are often a problem), and parameters will occasionally be different + in Python (input and output buffers, especially). All methods and functions + have a :attr:`__doc__` string describing their arguments and return values, and + for additional description you are referred to `Inside Macintosh + <http://developer.apple.com/documentation/macos8/mac8.html>`_ or similar works. + + These modules all live in a package called :mod:`Carbon`. Despite that name they + are not all part of the Carbon framework: CF is really in the CoreFoundation + framework and Qt is in the QuickTime framework. The normal use pattern is :: + + from Carbon import AE + +-.. warning:: ++.. note:: + +- The Carbon modules are removed in 3.0. ++ The Carbon modules have been removed in Python 3.0. + + + :mod:`Carbon.AE` --- Apple Events + ================================= + + .. module:: Carbon.AE + :platform: Mac + :synopsis: Interface to the Apple Events toolbox. + :deprecated: + + + ======================================= --- /dev/null +++ /library/diff/carbon.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,52 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to78__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/carbon.rst => r266/library/carbon.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to78__0"></td><td class="diff_header" id="from78_17">17</td><td nowrap="nowrap"><http://developer.apple.com/documentation/macos8/mac8.html>`_ or similar works.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from78_18">18</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to78__1"></td><td class="diff_header" id="from78_19">19</td><td nowrap="nowrap">These modules all live in a package called :mod:`Carbon`. Despite that name they</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from78_20">20</td><td nowrap="nowrap">are not all part of the Carbon framework: CF is really in the CoreFoundation</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from78_21">21</td><td nowrap="nowrap">framework and Qt is in the QuickTime framework. The normal use pattern is ::</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from78_22">22</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from78_23">23</td><td nowrap="nowrap"> from Carbon import AE</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from78_24">24</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to78__1">n</a></td><td class="diff_header" id="from78_25">25-</td><td nowrap="nowrap"><span class="diff_sub">.. warning::</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to78__1">n</a></td><td class="diff_header" id="to78_25">25+</td><td nowrap="nowrap"><span class="diff_add">.. note::</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from78_26">26</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to78__top">t</a></td><td class="diff_header" id="from78_27">27-</td><td nowrap="nowrap"> The Carbon modules a<span class="diff_chg">r</span>e removed in 3.0.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to78__top">t</a></td><td class="diff_header" id="to78_27">27+</td><td nowrap="nowrap"> The Carbon modules <span class="diff_add">h</span>a<span class="diff_chg">v</span>e<span class="diff_add"> been</span> removed in<span class="diff_add"> Python</span> 3.0.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from78_28">28</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from78_29">29</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from78_30">30</td><td nowrap="nowrap">:mod:`Carbon.AE` --- Apple Events</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from78_31">31</td><td nowrap="nowrap">=================================</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from78_32">32</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from78_33">33</td><td nowrap="nowrap">.. module:: Carbon.AE</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from78_34">34</td><td nowrap="nowrap"> :platform: Mac</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from78_35">35</td><td nowrap="nowrap"> :synopsis: Interface to the Apple Events toolbox.</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/cd.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,58 @@ +--- r262/library/cd.rst 2009-01-04 06:55:17.853888000 +0900 ++++ r266/library/cd.rst 2009-10-27 23:36:50.397095000 +0900 +@@ -7,26 +7,26 @@ + :synopsis: Interface to the CD-ROM on Silicon Graphics systems. + :deprecated: + + + .. deprecated:: 2.6 + The :mod:`cd` module has been deprecated for removal in Python 3.0. + + + This module provides an interface to the Silicon Graphics CD library. It is + available only on Silicon Graphics systems. + + The way the library works is as follows. A program opens the CD-ROM device with +-:func:`open` and creates a parser to parse the data from the CD with +-:func:`createparser`. The object returned by :func:`open` can be used to read ++:func:`.open` and creates a parser to parse the data from the CD with ++:func:`createparser`. The object returned by :func:`.open` can be used to read + data from the CD, but also to get status information for the CD-ROM device, and + to get information about the CD, such as the table of contents. Data from the + CD is passed to the parser, which parses the frames, and calls any callback + functions that have previously been added. + + An audio CD is divided into :dfn:`tracks` or :dfn:`programs` (the terms are used + interchangeably). Tracks can be subdivided into :dfn:`indices`. An audio CD + contains a :dfn:`table of contents` which gives the starts of the tracks on the + CD. Index 0 is usually the pause before the start of a track. The start of the + track as given by the table of contents is normally the start of index 1. + + Positions on a CD can be represented in two ways. Either a frame number or a +@@ -124,25 +124,25 @@ + ident + control + + Integer constants describing the various types of parser callbacks that can be + set by the :meth:`addcallback` method of CD parser objects (see below). + + + .. _player-objects: + + Player Objects + -------------- + +-Player objects (returned by :func:`open`) have the following methods: ++Player objects (returned by :func:`.open`) have the following methods: + + + .. method:: CD player.allowremoval() + + Unlocks the eject button on the CD-ROM drive permitting the user to eject the + caddy if desired. + + + .. method:: CD player.bestreadsize() + + Returns the best value to use for the *num_frames* parameter of the + :meth:`readda` method. Best is defined as the value that permits a continuous ======================================= --- /dev/null +++ /library/diff/cd.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,56 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to79__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/cd.rst => r266/library/cd.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to79__0"></td><td class="diff_header" id="from79_11">11</td><td nowrap="nowrap">.. deprecated:: 2.6</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_12">12</td><td nowrap="nowrap"> The :mod:`cd` module has been deprecated for removal in Python 3.0.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_13">13</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_14">14</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_15">15</td><td nowrap="nowrap">This module provides an interface to the Silicon Graphics CD library. It is</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_16">16</td><td nowrap="nowrap">available only on Silicon Graphics systems.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_17">17</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_18">18</td><td nowrap="nowrap">The way the library works is as follows. A program opens the CD-ROM device with</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to79__1">n</a></td><td class="diff_header" id="from79_19">19-</td><td nowrap="nowrap">:func:`open` and creates a parser to parse the data from the CD with</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to79__1">n</a></td><td class="diff_header" id="to79_19">19+</td><td nowrap="nowrap">:func:`<span class="diff_add">.</span>open` and creates a parser to parse the data from the CD with</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from79_20">20-</td><td nowrap="nowrap">:func:`createparser`. The object returned by :func:`open` can be used to read</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to79_20">20+</td><td nowrap="nowrap">:func:`createparser`. The object returned by :func:`<span class="diff_add">.</span>open` can be used to read</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from79_21">21</td><td nowrap="nowrap">data from the CD, but also to get status information for the CD-ROM device, and</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_22">22</td><td nowrap="nowrap">to get information about the CD, such as the table of contents. Data from the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_23">23</td><td nowrap="nowrap">CD is passed to the parser, which parses the frames, and calls any callback</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_24">24</td><td nowrap="nowrap">functions that have previously been added.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_25">25</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_26">26</td><td nowrap="nowrap">An audio CD is divided into :dfn:`tracks` or :dfn:`programs` (the terms are used</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_27">27</td><td nowrap="nowrap">interchangeably). Tracks can be subdivided into :dfn:`indices`. An audio CD</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_28">28</td><td nowrap="nowrap">contains a :dfn:`table of contents` which gives the starts of the tracks on the</td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to79__1"></td><td class="diff_header" id="from79_128">128</td><td nowrap="nowrap"> set by the :meth:`addcallback` method of CD parser objects (see below).</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_129">129</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_130">130</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_131">131</td><td nowrap="nowrap">.. _player-objects:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_132">132</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_133">133</td><td nowrap="nowrap">Player Objects</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_134">134</td><td nowrap="nowrap">--------------</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_135">135</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to79__top">t</a></td><td class="diff_header" id="from79_136">136-</td><td nowrap="nowrap">Player objects (returned by :func:`open`) have the following methods:</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to79__top">t</a></td><td class="diff_header" id="to79_136">136+</td><td nowrap="nowrap">Player objects (returned by :func:`<span class="diff_add">.</span>open`) have the following methods:</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from79_137">137</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_138">138</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_139">139</td><td nowrap="nowrap">.. method:: CD player.allowremoval()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_140">140</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_141">141</td><td nowrap="nowrap"> Unlocks the eject button on the CD-ROM drive permitting the user to eject the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_142">142</td><td nowrap="nowrap"> caddy if desired.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_143">143</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from79_144">144</td><td nowrap="nowrap"></td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/cgi.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,189 @@ +--- r262/library/cgi.rst 2009-02-23 19:41:11.107573000 +0900 ++++ r266/library/cgi.rst 2010-08-03 03:30:48.429673000 +0900 +@@ -1,15 +1,14 @@ +- +-:mod:`cgi` --- Common Gateway Interface support. +-================================================ ++:mod:`cgi` --- Common Gateway Interface support ++=============================================== + + .. module:: cgi + :synopsis: Helpers for running Python scripts via the Common Gateway Interface. + + + .. index:: + pair: WWW; server + pair: CGI; protocol + pair: HTTP; protocol + pair: MIME; headers + single: URL + single: Common Gateway Interface +@@ -83,38 +82,39 @@ + It's very helpful to use this feature during script development. The reports + produced by :mod:`cgitb` provide information that can save you a lot of time in + tracking down bugs. You can always remove the ``cgitb`` line later when you + have tested your script and are confident that it works correctly. + + To get at submitted form data, it's best to use the :class:`FieldStorage` class. + The other classes defined in this module are provided mostly for backward + compatibility. Instantiate it exactly once, without arguments. This reads the + form contents from standard input or the environment (depending on the value of + various environment variables set according to the CGI standard). Since it may + consume standard input, it should be instantiated only once. + +-The :class:`FieldStorage` instance can be indexed like a Python dictionary, and +-also supports the standard dictionary methods :meth:`has_key` and :meth:`keys`. +-The built-in :func:`len` is also supported. Form fields containing empty +-strings are ignored and do not appear in the dictionary; to keep such values, +-provide a true value for the optional *keep_blank_values* keyword parameter when +-creating the :class:`FieldStorage` instance. ++The :class:`FieldStorage` instance can be indexed like a Python dictionary. ++It allows membership testing with the :keyword:`in` operator, and also supports ++the standard dictionary method :meth:`keys` and the built-in function ++:func:`len`. Form fields containing empty strings are ignored and do not appear ++in the dictionary; to keep such values, provide a true value for the optional ++*keep_blank_values* keyword parameter when creating the :class:`FieldStorage` ++instance. + + For instance, the following code (which assumes that the + :mailheader:`Content-Type` header and blank line have already been printed) + checks that the fields ``name`` and ``addr`` are both set to a non-empty + string:: + + form = cgi.FieldStorage() +- if not (form.has_key("name") and form.has_key("addr")): ++ if "name" not in form or "addr" not in form: + print "<H1>Error</H1>" + print "Please fill in the name and addr fields." + return + print "<p>name:", form["name"].value + print "<p>addr:", form["addr"].value + ...further form processing here... + + Here the fields, accessed through ``form[key]``, are themselves instances of + :class:`FieldStorage` (or :class:`MiniFieldStorage`, depending on the form + encoding). The :attr:`value` attribute of the instance yields the string value + of the field. The :meth:`getvalue` method returns this string value directly; + it also accepts an optional second argument as a default to return if the +@@ -127,54 +127,54 @@ + expect this possibility (when your HTML form contains multiple fields with the + same name), use the :func:`getlist` function, which always returns a list of + values (so that you do not need to special-case the single item case). For + example, this code concatenates any number of username fields, separated by + commas:: + + value = form.getlist("username") + usernames = ",".join(value) + + If a field represents an uploaded file, accessing the value via the + :attr:`value` attribute or the :func:`getvalue` method reads the entire file in + memory as a string. This may not be what you want. You can test for an uploaded +-file by testing either the :attr:`filename` attribute or the :attr:`file` +-attribute. You can then read the data at leisure from the :attr:`file` ++file by testing either the :attr:`filename` attribute or the :attr:`!file` ++attribute. You can then read the data at leisure from the :attr:`!file` + attribute:: + + fileitem = form["userfile"] + if fileitem.file: + # It's an uploaded file; count lines + linecount = 0 + while 1: + line = fileitem.file.readline() + if not line: break + linecount = linecount + 1 + + If an error is encountered when obtaining the contents of an uploaded file + (for example, when the user interrupts the form submission by clicking on + a Back or Cancel button) the :attr:`done` attribute of the object for the + field will be set to the value -1. + + The file upload draft standard entertains the possibility of uploading multiple + files from one field (using a recursive :mimetype:`multipart/\*` encoding). + When this occurs, the item will be a dictionary-like :class:`FieldStorage` item. +-This can be determined by testing its :attr:`type` attribute, which should be ++This can be determined by testing its :attr:`!type` attribute, which should be + :mimetype:`multipart/form-data` (or perhaps another MIME type matching + :mimetype:`multipart/\*`). In this case, it can be iterated over recursively + just like the top-level form object. + + When a form is submitted in the "old" format (as the query string or as a single + data part of type :mimetype:`application/x-www-form-urlencoded`), the items will + actually be instances of the class :class:`MiniFieldStorage`. In this case, the +-:attr:`list`, :attr:`file`, and :attr:`filename` attributes are always ``None``. ++:attr:`!list`, :attr:`!file`, and :attr:`filename` attributes are always ``None``. + + A form submitted via POST that also has a query string will contain both + :class:`FieldStorage` and :class:`MiniFieldStorage` items. + + Higher Level Interface + ---------------------- + + .. versionadded:: 2.2 + + The previous section explains how to read CGI form data using the + :class:`FieldStorage` class. This section describes a higher level interface + which was added to this class to allow one to do it in a more readable and +@@ -204,25 +204,25 @@ + <input type="checkbox" name="item" value="2" /> + + In most situations, however, there's only one form control with a particular + name in a form and then you expect and need only one value associated with this + name. So you write a script containing for example this code:: + + user = form.getvalue("user").upper() + + The problem with the code is that you should never expect that a client will + provide valid input to your scripts. For example, if a curious user appends + another ``user=foo`` pair to the query string, then the script would crash, + because in this situation the ``getvalue("user")`` method call returns a list +-instead of a string. Calling the :meth:`toupper` method on a list is not valid ++instead of a string. Calling the :meth:`~str.upper` method on a list is not valid + (since lists do not have a method of this name) and results in an + :exc:`AttributeError` exception. + + Therefore, the appropriate way to read form data values was to always use the + code which checks whether the obtained value is a single value or a list of + values. That's annoying and leads to less readable scripts. + + A more convenient approach is to use the methods :meth:`getfirst` and + :meth:`getlist` provided by this higher level interface. + + + .. method:: FieldStorage.getfirst(name[, default]) +@@ -340,28 +340,31 @@ + + + .. function:: print_environ_usage() + + Print a list of useful (used by CGI) environment variables in HTML. + + + .. function:: escape(s[, quote]) + + Convert the characters ``'&'``, ``'<'`` and ``'>'`` in string *s* to HTML-safe + sequences. Use this if you need to display text that might contain such + characters in HTML. If the optional flag *quote* is true, the quotation mark +- character (``'"'``) is also translated; this helps for inclusion in an HTML +- attribute value, as in ``<A HREF="...">``. If the value to be quoted might +- include single- or double-quote characters, or both, consider using the +- :func:`quoteattr` function in the :mod:`xml.sax.saxutils` module instead. ++ character (``"``) is also translated; this helps for inclusion in an HTML ++ attribute value delimited by double quotes, as in ``<a href="...">``. Note ++ that single quotes are never translated. ++ ++ If the value to be quoted might include single- or double-quote characters, ++ or both, consider using the :func:`quoteattr` function in the ++ :mod:`xml.sax.saxutils` module instead. + + + .. _cgi-security: + + Caring about security + --------------------- + + .. index:: pair: CGI; security + + There's one important rule: if you invoke an external program (via the + :func:`os.system` or :func:`os.popen` functions. or others with similar + functionality), make very sure you don't pass arbitrary strings received from ======================================= --- /dev/null +++ /library/diff/cgi.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,99 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to80__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/cgi.rst => r266/library/cgi.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to80__0"><a href="#difflib_chg_to80__1">n</a></td><td class="diff_header" id="from80_1">1-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from80_2">2-</td><td nowrap="nowrap">:mod:`cgi` --- Common Gateway Interface support<span class="diff_sub">.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_1">1+</td><td nowrap="nowrap">:mod:`cgi` --- Common Gateway Interface support</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from80_3">3-</td><td nowrap="nowrap">===============================================<span class="diff_sub">=</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_2">2+</td><td nowrap="nowrap">===============================================</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from80_4">4</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_5">5</td><td nowrap="nowrap">.. module:: cgi</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_6">6</td><td nowrap="nowrap"> :synopsis: Helpers for running Python scripts via the Common Gateway Interface.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_7">7</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_8">8</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_9">9</td><td nowrap="nowrap">.. index::</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_10">10</td><td nowrap="nowrap"> pair: WWW; server</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_11">11</td><td nowrap="nowrap"> pair: CGI; protocol</td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to80__1"></td><td class="diff_header" id="from80_87">87</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_88">88</td><td nowrap="nowrap">To get at submitted form data, it's best to use the :class:`FieldStorage` class.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_89">89</td><td nowrap="nowrap">The other classes defined in this module are provided mostly for backward</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_90">90</td><td nowrap="nowrap">compatibility. Instantiate it exactly once, without arguments. This reads the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_91">91</td><td nowrap="nowrap">form contents from standard input or the environment (depending on the value of</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_92">92</td><td nowrap="nowrap">various environment variables set according to the CGI standard). Since it may</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_93">93</td><td nowrap="nowrap">consume standard input, it should be instantiated only once.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_94">94</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to80__2">n</a></td><td class="diff_header" id="from80_95">95-</td><td nowrap="nowrap">The :class:`FieldStorage` instance can be indexed like a Python dictionary<span class="diff_chg">, and</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to80__2">n</a></td><td class="diff_header" id="to80_94">94+</td><td nowrap="nowrap">The :class:`FieldStorage` instance can be indexed like a Python dictionary<span class="diff_chg">.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from80_96">96-</td><td nowrap="nowrap"><span class="diff_sub">also supports the standard dictionary methods :meth:`has_key` and :meth:`keys`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_95">95+</td><td nowrap="nowrap"><span class="diff_add">It allows membership testing with the :keyword:`in` operator, and also supports</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from80_97">97-</td><td nowrap="nowrap"><span class="diff_sub">The built-in :func:`len` is also supported. Form fields containing empty</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_96">96+</td><td nowrap="nowrap"><span class="diff_add">the standard dictionary method :meth:`keys` and the built-in function</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from80_98">98-</td><td nowrap="nowrap"><span class="diff_sub">strings are ignored and do not appear in the dictionary; to keep such values,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_97">97+</td><td nowrap="nowrap"><span class="diff_add">:func:`len`. Form fields containing empty strings are ignored and do not appear</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from80_99">99-</td><td nowrap="nowrap"><span class="diff_sub">provide a true value for the optional *keep_blank_values* keyword parameter when</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_98">98+</td><td nowrap="nowrap"><span class="diff_add">in the dictionary; to keep such values, provide a true value for the optional</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from80_100">100-</td><td nowrap="nowrap"><span class="diff_sub">creating the :class:`FieldStorage` instance.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_99">99+</td><td nowrap="nowrap"><span class="diff_add">*keep_blank_values* keyword parameter when creating the :class:`FieldStorage`</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to80__2"></td><td class="diff_header" id="to80_100">100+</td><td nowrap="nowrap"><span class="diff_add">instance.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from80_101">101</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_102">102</td><td nowrap="nowrap">For instance, the following code (which assumes that the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_103">103</td><td nowrap="nowrap">:mailheader:`Content-Type` header and blank line have already been printed)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_104">104</td><td nowrap="nowrap">checks that the fields ``name`` and ``addr`` are both set to a non-empty</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_105">105</td><td nowrap="nowrap">string::</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_106">106</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_107">107</td><td nowrap="nowrap"> form = cgi.FieldStorage()</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to80__3">n</a></td><td class="diff_header" id="from80_108">108-</td><td nowrap="nowrap"><span class="diff_sub"> if not (form.has_key("name") and form.has_key("addr")):</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to80__3">n</a></td><td class="diff_header" id="to80_108">108+</td><td nowrap="nowrap"><span class="diff_add"> if "name" not in form or "addr" not in form:</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from80_109">109</td><td nowrap="nowrap"> print "<H1>Error</H1>"</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_110">110</td><td nowrap="nowrap"> print "Please fill in the name and addr fields."</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_111">111</td><td nowrap="nowrap"> return</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_112">112</td><td nowrap="nowrap"> print "<p>name:", form["name"].value</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_113">113</td><td nowrap="nowrap"> print "<p>addr:", form["addr"].value</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_114">114</td><td nowrap="nowrap"> ...further form processing here...</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_115">115</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_116">116</td><td nowrap="nowrap">Here the fields, accessed through ``form[key]``, are themselves instances of</td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to80__3"></td><td class="diff_header" id="from80_131">131</td><td nowrap="nowrap">commas::</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_132">132</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_133">133</td><td nowrap="nowrap"> value = form.getlist("username")</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_134">134</td><td nowrap="nowrap"> usernames = ",".join(value)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_135">135</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_136">136</td><td nowrap="nowrap">If a field represents an uploaded file, accessing the value via the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_137">137</td><td nowrap="nowrap">:attr:`value` attribute or the :func:`getvalue` method reads the entire file in</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_138">138</td><td nowrap="nowrap">memory as a string. This may not be what you want. You can test for an uploaded</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to80__4">n</a></td><td class="diff_header" id="from80_139">139-</td><td nowrap="nowrap">file by testing either the :attr:`filename` attribute or the :attr:`file`</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to80__4">n</a></td><td class="diff_header" id="to80_139">139+</td><td nowrap="nowrap">file by testing either the :attr:`filename` attribute or the :attr:`<span class="diff_add">!</span>file`</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from80_140">140-</td><td nowrap="nowrap">attribute. You can then read the data at leisure from the :attr:`file`</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_140">140+</td><td nowrap="nowrap">attribute. You can then read the data at leisure from the :attr:`<span class="diff_add">!</span>file`</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from80_141">141</td><td nowrap="nowrap">attribute::</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_142">142</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_143">143</td><td nowrap="nowrap"> fileitem = form["userfile"]</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_144">144</td><td nowrap="nowrap"> if fileitem.file:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_145">145</td><td nowrap="nowrap"> # It's an uploaded file; count lines</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_146">146</td><td nowrap="nowrap"> linecount = 0</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_147">147</td><td nowrap="nowrap"> while 1:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_148">148</td><td nowrap="nowrap"> line = fileitem.file.readline()</td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to80__4"></td><td class="diff_header" id="from80_152">152</td><td nowrap="nowrap">If an error is encountered when obtaining the contents of an uploaded file</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_153">153</td><td nowrap="nowrap">(for example, when the user interrupts the form submission by clicking on</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_154">154</td><td nowrap="nowrap">a Back or Cancel button) the :attr:`done` attribute of the object for the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_155">155</td><td nowrap="nowrap">field will be set to the value -1.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_156">156</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_157">157</td><td nowrap="nowrap">The file upload draft standard entertains the possibility of uploading multiple</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_158">158</td><td nowrap="nowrap">files from one field (using a recursive :mimetype:`multipart/\*` encoding).</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_159">159</td><td nowrap="nowrap">When this occurs, the item will be a dictionary-like :class:`FieldStorage` item.</td></tr><tr><td class="diff_next" id="difflib_chg_to80__5"><a href="#difflib_chg_to80__5">n</a></td><td class="diff_header" id="from80_160">160-</td><td nowrap="nowrap">This can be determined by testing its :attr:`type` attribute, which should be</td></tr> +<tr><td class="diff_next" id="difflib_chg_to80__5"><a href="#difflib_chg_to80__5">n</a></td><td class="diff_header" id="to80_160">160+</td><td nowrap="nowrap">This can be determined by testing its :attr:`<span class="diff_add">!</span>type` attribute, which should be</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from80_161">161</td><td nowrap="nowrap">:mimetype:`multipart/form-data` (or perhaps another MIME type matching</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_162">162</td><td nowrap="nowrap">:mimetype:`multipart/\*`). In this case, it can be iterated over recursively</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_163">163</td><td nowrap="nowrap">just like the top-level form object.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_164">164</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_165">165</td><td nowrap="nowrap">When a form is submitted in the "old" format (as the query string or as a single</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_166">166</td><td nowrap="nowrap">data part of type :mimetype:`application/x-www-form-urlencoded`), the items will</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_167">167</td><td nowrap="nowrap">actually be instances of the class :class:`MiniFieldStorage`. In this case, the</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to80__6">n</a></td><td class="diff_header" id="from80_168">168-</td><td nowrap="nowrap">:attr:`list`, :attr:`file`, and :attr:`filename` attributes are always ``None``.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to80__6">n</a></td><td class="diff_header" id="to80_168">168+</td><td nowrap="nowrap">:attr:`<span class="diff_add">!</span>list`, :attr:`<span class="diff_add">!</span>file`, and :attr:`filename` attributes are always ``None``.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from80_169">169</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_170">170</td><td nowrap="nowrap">A form submitted via POST that also has a query string will contain both</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_171">171</td><td nowrap="nowrap">:class:`FieldStorage` and :class:`MiniFieldStorage` items.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_172">172</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_173">173</td><td nowrap="nowrap">Higher Level Interface</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_174">174</td><td nowrap="nowrap">----------------------</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_175">175</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_176">176</td><td nowrap="nowrap">.. versionadded:: 2.2</td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to80__6"></td><td class="diff_header" id="from80_208">208</td><td nowrap="nowrap">name. So you write a script containing for example this code::</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_209">209</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_210">210</td><td nowrap="nowrap"> user = form.getvalue("user").upper()</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_211">211</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_212">212</td><td nowrap="nowrap">The problem with the code is that you should never expect that a client will</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_213">213</td><td nowrap="nowrap">provide valid input to your scripts. For example, if a curious user appends</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_214">214</td><td nowrap="nowrap">another ``user=foo`` pair to the query string, then the script would crash,</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_215">215</td><td nowrap="nowrap">because in this situation the ``getvalue("user")`` method call returns a list</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to80__7">n</a></td><td class="diff_header" id="from80_216">216-</td><td nowrap="nowrap">instead of a string. Calling the :meth:`t<span class="diff_chg">o</span>upper` method on a list is not valid</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to80__7">n</a></td><td class="diff_header" id="to80_216">216+</td><td nowrap="nowrap">instead of a string. Calling the :meth:`<span class="diff_add">~s</span>t<span class="diff_chg">r.</span>upper` method on a list is not valid</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from80_217">217</td><td nowrap="nowrap">(since lists do not have a method of this name) and results in an</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_218">218</td><td nowrap="nowrap">:exc:`AttributeError` exception.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_219">219</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_220">220</td><td nowrap="nowrap">Therefore, the appropriate way to read form data values was to always use the</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_221">221</td><td nowrap="nowrap">code which checks whether the obtained value is a single value or a list of</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_222">222</td><td nowrap="nowrap">values. That's annoying and leads to less readable scripts.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_223">223</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_224">224</td><td nowrap="nowrap">A more convenient approach is to use the methods :meth:`getfirst` and</td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to80__7"></td><td class="diff_header" id="from80_344">344</td><td nowrap="nowrap"> Print a list of useful (used by CGI) environment variables in HTML.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_345">345</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_346">346</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_347">347</td><td nowrap="nowrap">.. function:: escape(s[, quote])</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_348">348</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_349">349</td><td nowrap="nowrap"> Convert the characters ``'&'``, ``'<'`` and ``'>'`` in string *s* to HTML-safe</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_350">350</td><td nowrap="nowrap"> sequences. Use this if you need to display text that might contain such</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_351">351</td><td nowrap="nowrap"> characters in HTML. If the optional flag *quote* is true, the quotation mark</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to80__top">t</a></td><td class="diff_header" id="from80_352">352-</td><td nowrap="nowrap"> character (``<span class="diff_sub">'</span>"<span class="diff_sub">'</span>``) is also translated; this helps for inclusion in an HTML</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to80__top">t</a></td><td class="diff_header" id="to80_352">352+</td><td nowrap="nowrap"> character (``"``) is also translated; this helps for inclusion in an HTML</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from80_353">353-</td><td nowrap="nowrap"><span class="diff_sub"> attribute value, as in ``<A HREF="...">``. If the value to be quoted might</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_353">353+</td><td nowrap="nowrap"><span class="diff_add"> attribute value delimited by double quotes, as in ``<a href="...">``. Note</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from80_354">354-</td><td nowrap="nowrap"><span class="diff_sub"> include single- or double-quote characters, or both, consider using the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_354">354+</td><td nowrap="nowrap"><span class="diff_add"> that single quotes are never translated.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from80_355">355-</td><td nowrap="nowrap"><span class="diff_sub"> :func:`quoteattr` function in the :mod:`xml.sax.saxutils` module instead.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_355">355+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_356">356+</td><td nowrap="nowrap"><span class="diff_add"> If the value to be quoted might include single- or double-quote characters,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_357">357+</td><td nowrap="nowrap"><span class="diff_add"> or both, consider using the :func:`quoteattr` function in the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to80_358">358+</td><td nowrap="nowrap"><span class="diff_add"> :mod:`xml.sax.saxutils` module instead.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from80_356">356</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_357">357</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_358">358</td><td nowrap="nowrap">.. _cgi-security:</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_359">359</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_360">360</td><td nowrap="nowrap">Caring about security</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_361">361</td><td nowrap="nowrap">---------------------</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_362">362</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from80_363">363</td><td nowrap="nowrap">.. index:: pair: CGI; security</td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= --- /dev/null +++ /library/diff/cmath.rst.diff Sun Feb 20 00:55:00 2011 @@ -0,0 +1,347 @@ +--- r262/library/cmath.rst 2009-01-04 06:55:17.853888000 +0900 ++++ r266/library/cmath.rst 2010-01-02 23:31:13.551062000 +0900 +@@ -1,231 +1,241 @@ +- + :mod:`cmath` --- Mathematical functions for complex numbers + =========================================================== + + .. module:: cmath + :synopsis: Mathematical functions for complex numbers. + + + This module is always available. It provides access to mathematical functions + for complex numbers. The functions in this module accept integers, + floating-point numbers or complex numbers as arguments. They will also accept + any Python object that has either a :meth:`__complex__` or a :meth:`__float__` + method: these methods are used to convert the object to a complex or + floating-point number, respectively, and the function is then applied to the + result of the conversion. + + .. note:: + + On platforms with hardware and system-level support for signed + zeros, functions involving branch cuts are continuous on *both* + sides of the branch cut: the sign of the zero distinguishes one + side of the branch cut from the other. On platforms that do not + support signed zeros the continuity is as specified below. + + +-Complex coordinates +-------------------- +- +-Complex numbers can be expressed by two important coordinate systems. +-Python's :class:`complex` type uses rectangular coordinates where a number +-on the complex plain is defined by two floats, the real part and the imaginary +-part. +- +-Definition:: +- +- z = x + 1j * y +- +- x := real(z) +- y := imag(z) +- +-In engineering the polar coordinate system is popular for complex numbers. In +-polar coordinates a complex number is defined by the radius *r* and the phase +-angle *phi*. The radius *r* is the absolute value of the complex, which can be +-viewed as distance from (0, 0). The radius *r* is always 0 or a positive float. +-The phase angle *phi* is the counter clockwise angle from the positive x axis, +-e.g. *1* has the angle *0*, *1j* has the angle *π/2* and *-1* the angle *-π*. +- +-.. note:: +- While :func:`phase` and func:`polar` return *+π* for a negative real they +- may return *-π* for a complex with a very small negative imaginary +- part, e.g. *-1-1E-300j*. ++Conversions to and from polar coordinates ++----------------------------------------- + ++A Python complex number ``z`` is stored internally using *rectangular* ++or *Cartesian* coordinates. It is completely determined by its *real ++part* ``z.real`` and its *imaginary part* ``z.imag``. In other ++words:: ++ ++ z == z.real + z.imag*1j ++ ++*Polar coordinates* give an alternative way to represent a complex ++number. In polar coordinates, a complex number *z* is defined by the ++modulus *r* and the phase angle *phi*. The modulus *r* is the distance ++from *z* to the origin, while the phase *phi* is the counterclockwise ++angle, measured in radians, from the positive x-axis to the line ++segment that joins the origin to *z*. + +-Definition:: ++The following functions can be used to convert from the native ++rectangular coordinates to polar coordinates and back. + +- z = r * exp(1j * phi) +- z = r * cis(phi) ++.. function:: phase(x) + +- r := abs(z) := sqrt(real(z)**2 + imag(z)**2) +- phi := phase(z) := atan2(imag(z), real(z)) +- cis(phi) := cos(phi) + 1j * sin(phi) ++ Return the phase of *x* (also known as the *argument* of *x*), as a ++ float. ``phase(x)`` is equivalent to ``math.atan2(x.imag, ++ x.real)``. The result lies in the range [-π, π], and the branch ++ cut for this operation lies along the negative real axis, ++ continuous from above. On systems with support for signed zeros ++ (which includes most systems in current use), this means that the ++ sign of the result is the same as the sign of ``x.imag``, even when ++ ``x.imag`` is zero:: ++ ++ >>> phase(complex(-1.0, 0.0)) ++ 3.1415926535897931 ++ >>> phase(complex(-1.0, -0.0)) ++ -3.1415926535897931 + ++ .. versionadded:: 2.6 + +-.. function:: phase(x) + +- Return phase, also known as the argument, of a complex. ++.. note:: + +- .. versionadded:: 2.6 ++ The modulus (absolute value) of a complex number *x* can be ++ computed using the built-in :func:`abs` function. There is no ++ separate :mod:`cmath` module function for this operation. + + + .. function:: polar(x) + +- Convert a :class:`complex` from rectangular coordinates to polar +- coordinates. The function returns a tuple with the two elements +- *r* and *phi*. *r* is the distance from 0 and *phi* the phase +- angle. ++ Return the representation of *x* in polar coordinates. Returns a ++ pair ``(r, phi)`` where *r* is the modulus of *x* and phi is the ++ phase of *x*. ``polar(x)`` is equivalent to ``(abs(x), ++ phase(x))``. + + .. versionadded:: 2.6 + + + .. function:: rect(r, phi) + +- Convert from polar coordinates to rectangular coordinates and return +- a :class:`complex`. ++ Return the complex number *x* with polar coordinates *r* and *phi*. ++ Equivalent to ``r * (math.cos(phi) + math.sin(phi)*1j)``. + + .. versionadded:: 2.6 + + ++Power and logarithmic functions ++------------------------------- + +-cmath functions +---------------- ++.. function:: exp(x) + +-.. function:: acos(x) ++ Return the exponential value ``e**x``. + +- Return the arc cosine of *x*. There are two branch cuts: One extends right from +- 1 along the real axis to ∞, continuous from below. The other extends left from +- -1 along the real axis to -∞, continuous from above. + ++.. function:: log(x[, base]) + +-.. function:: acosh(x) ++ Returns the logarithm of *x* to the given *base*. If the *base* is not ++ specified, returns the natural logarithm of *x*. There is one branch cut, from 0 ++ along the negative real axis to -∞, continuous from above. + +- Return the hyperbolic arc cosine of *x*. There is one branch cut, extending left +- from 1 along the real axis to -∞, continuous from above. ++ .. versionchanged:: 2.4 ++ *base* argument added. + + +-.. function:: asin(x) ++.. function:: log10(x) + +- Return the arc sine of *x*. This has the same branch cuts as :func:`acos`. ++ Return the base-10 logarithm of *x*. This has the same branch cut as ++ :func:`log`. + + +-.. function:: asinh(x) ++.. function:: sqrt(x) + +- Return the hyperbolic arc sine of *x*. There are two branch cuts: +- One extends from ``1j`` along the imaginary axis to ``∞j``, +- continuous from the right. The other extends from ``-1j`` along +- the imaginary axis to ``-∞j``, continuous from the left. ++ Return the square root of *x*. This has the same branch cut as :func:`log`. ++ ++ ++Trigonometric functions ++----------------------- ++ ++.. function:: acos(x) ++ ++ Return the arc cosine of *x*. There are two branch cuts: One extends right from ++ 1 along the real axis to ∞, continuous from below. The other extends left from ++ -1 along the real axis to -∞, continuous from above. + +- .. versionchanged:: 2.6 +- branch cuts moved to match those recommended by the C99 standard ++ ++.. function:: asin(x) ++ ++ Return the arc sine of *x*. This has the same branch cuts as :func:`acos`. + + + .. function:: atan(x) + + Return the arc tangent of *x*. There are two branch cuts: One extends from + ``1j`` along the imaginary axis to ``∞j``, continuous from the right. The + other extends from ``-1j`` along the imaginary axis to ``-∞j``, continuous + from the left. + + .. versionchanged:: 2.6 + direction of continuity of upper cut reversed + + +-.. function:: atanh(x) +- +- Return the hyperbolic arc tangent of *x*. There are two branch cuts: One +- extends from ``1`` along the real axis to ``∞``, continuous from below. The +- other extends from ``-1`` along the real axis to ``-∞``, continuous from +- above. +- +- .. versionchanged:: 2.6 +- direction of continuity of right cut reversed +- +- + .. function:: cos(x) + + Return the cosine of *x*. + + +-.. function:: cosh(x) ++.. function:: sin(x) + +- Return the hyperbolic cosine of *x*. ++ Return the sine of *x*. + + +-.. function:: exp(x) ++.. function:: tan(x) + +- Return the exponential value ``e**x``. ++ Return the tangent of *x*. + + +-.. function:: isinf(x) ++Hyperbolic functions ++-------------------- + +- Return *True* if the real or the imaginary part of x is positive +- or negative infinity. ++.. function:: acosh(x) + +- .. versionadded:: 2.6 ++ Return the hyperbolic arc cosine of *x*. There is one branch cut, extending left ++ from 1 along the real axis to -∞, continuous from above. + + +-.. function:: isnan(x) ++.. function:: asinh(x) + +- Return *True* if the real or imaginary part of x is not a number (NaN). ++ Return the hyperbolic arc sine of *x*. There are two branch cuts: ++ One extends from ``1j`` along the imaginary axis to ``∞j``, ++ continuous from the right. The other extends from ``-1j`` along ++ the imaginary axis to ``-∞j``, continuous from the left. + +- .. versionadded:: 2.6 ++ .. versionchanged:: 2.6 ++ branch cuts moved to match those recommended by the C99 standard + + +-.. function:: log(x[, base]) ++.. function:: atanh(x) + +- Returns the logarithm of *x* to the given *base*. If the *base* is not +- specified, returns the natural logarithm of *x*. There is one branch cut, from 0 +- along the negative real axis to -∞, continuous from above. ++ Return the hyperbolic arc tangent of *x*. There are two branch cuts: One ++ extends from ``1`` along the real axis to ``∞``, continuous from below. The ++ other extends from ``-1`` along the real axis to ``-∞``, continuous from ++ above. + +- .. versionchanged:: 2.4 +- *base* argument added. ++ .. versionchanged:: 2.6 ++ direction of continuity of right cut reversed + + +-.. function:: log10(x) ++.. function:: cosh(x) + +- Return the base-10 logarithm of *x*. This has the same branch cut as +- :func:`log`. ++ Return the hyperbolic cosine of *x*. + + +-.. function:: sin(x) ++.. function:: sinh(x) + +- Return the sine of *x*. ++ Return the hyperbolic sine of *x*. + + +-.. function:: sinh(x) ++.. function:: tanh(x) + +- Return the hyperbolic sine of *x*. ++ Return the hyperbolic tangent of *x*. + + +-.. function:: sqrt(x) ++Classification functions ++------------------------ + +- Return the square root of *x*. This has the same branch cut as :func:`log`. ++.. function:: isinf(x) + ++ Return *True* if the real or the imaginary part of x is positive ++ or negative infinity. + +-.. function:: tan(x) ++ .. versionadded:: 2.6 + +- Return the tangent of *x*. + ++.. function:: isnan(x) + +-.. function:: tanh(x) ++ Return *True* if the real or imaginary part of x is not a number (NaN). ++ ++ .. versionadded:: 2.6 + +- Return the hyperbolic tangent of *x*. + +-The module also defines two mathematical constants: ++Constants ++--------- + + + .. data:: pi + +- The mathematical constant *pi*, as a float. ++ The mathematical constant *π*, as a float. + + + .. data:: e + + The mathematical constant *e*, as a float. + + .. index:: module: math + + Note that the selection of functions is similar, but not identical, to that in + module :mod:`math`. The reason for having two modules is that some users aren't + interested in complex numbers, and perhaps don't even know what they are. They + would rather have ``math.sqrt(-1)`` raise an exception than return a complex ======================================= --- /dev/null +++ /library/diff/cmath.rst.html Sun Feb 20 00:55:00 2011 @@ -0,0 +1,280 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> + +<head> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + <title></title> + <style type="text/css"> + table.diff {font-family:Courier; border:medium;} + .diff_header {background-color:#e0e0e0} + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c0} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + </style> +</head> + +<body> + + <table class="diff" id="difflib_chg_to81__top" + cellspacing="0" cellpadding="0" rules="groups" > + <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup> + <thead><tr><th class="diff_next"><br /></th><th colspan="2" class="diff_header">r262/library/cmath.rst => r266/library/cmath.rst</th></tr></thead> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to81__0"><a href="#difflib_chg_to81__1">n</a></td><td class="diff_header" id="from81_1">1-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_2">2</td><td nowrap="nowrap">:mod:`cmath` --- Mathematical functions for complex numbers</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_3">3</td><td nowrap="nowrap">===========================================================</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_4">4</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_5">5</td><td nowrap="nowrap">.. module:: cmath</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_6">6</td><td nowrap="nowrap"> :synopsis: Mathematical functions for complex numbers.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_7">7</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_8">8</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_9">9</td><td nowrap="nowrap">This module is always available. It provides access to mathematical functions</td></tr> </tbody> + <tbody> + <tr><td class="diff_next" id="difflib_chg_to81__1"></td><td class="diff_header" id="from81_18">18</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_19">19</td><td nowrap="nowrap"> On platforms with hardware and system-level support for signed</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_20">20</td><td nowrap="nowrap"> zeros, functions involving branch cuts are continuous on *both*</td></tr> <tr><td class="diff_next" id="difflib_chg_to81__2"></td><td class="diff_header" id="from81_21">21</td><td nowrap="nowrap"> sides of the branch cut: the sign of the zero distinguishes one</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_22">22</td><td nowrap="nowrap"> side of the branch cut from the other. On platforms that do not</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_23">23</td><td nowrap="nowrap"> support signed zeros the continuity is as specified below.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_24">24</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_25">25</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next" id="difflib_chg_to81__3"><a href="#difflib_chg_to81__2">n</a></td><td class="diff_header" id="from81_26">26-</td><td nowrap="nowrap"><span class="diff_sub">Complex coordinates</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to81__3"><a href="#difflib_chg_to81__2">n</a></td><td class="diff_header" id="to81_25">25+</td><td nowrap="nowrap"><span class="diff_add">Conversions to and from polar coordinates</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_27">27-</td><td nowrap="nowrap"><span class="diff_sub">-------------------</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_26">26+</td><td nowrap="nowrap"><span class="diff_add">-----------------------------------------</span></td></tr> + <tr><td class="diff_next" id="difflib_chg_to81__4"></td><td class="diff_header" id="from81_28">28</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__3">n</a></td><td class="diff_header" id="from81_29">29-</td><td nowrap="nowrap"><span class="diff_sub">Complex numbers can be expressed by two important coordinate systems.</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to81__3">n</a></td><td class="diff_header" id="to81_28">28+</td><td nowrap="nowrap"><span class="diff_add">A Python complex number ``z`` is stored internally using *rectangular*</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_30">30-</td><td nowrap="nowrap"><span class="diff_sub">Python's :class:`complex` type uses rectangular coordinates where a number</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_29">29+</td><td nowrap="nowrap"><span class="diff_add">or *Cartesian* coordinates. It is completely determined by its *real</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_31">31-</td><td nowrap="nowrap"><span class="diff_sub">on the complex plain is defined by two floats, the real part and the imaginary</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_30">30+</td><td nowrap="nowrap"><span class="diff_add">part* ``z.real`` and its *imaginary part* ``z.imag``. In other</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_32">32-</td><td nowrap="nowrap"><span class="diff_sub">part.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_31">31+</td><td nowrap="nowrap"><span class="diff_add">words::</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_33">33</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__4">n</a></td><td class="diff_header" id="from81_34">34-</td><td nowrap="nowrap"><span class="diff_sub">Definition::</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to81__4">n</a></td><td class="diff_header" id="to81_33">33+</td><td nowrap="nowrap"><span class="diff_add"> z == z.real + z.imag*1j</span></td></tr> + <tr><td class="diff_next" id="difflib_chg_to81__5"></td><td class="diff_header" id="from81_35">35</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__5">n</a></td><td class="diff_header" id="from81_36">36-</td><td nowrap="nowrap"><span class="diff_sub"> z = x + 1j * y</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to81__5">n</a></td><td class="diff_header" id="to81_35">35+</td><td nowrap="nowrap"><span class="diff_add">*Polar coordinates* give an alternative way to represent a complex</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_36">36+</td><td nowrap="nowrap"><span class="diff_add">number. In polar coordinates, a complex number *z* is defined by the</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to81__6"></td><td class="diff_header" id="to81_37">37+</td><td nowrap="nowrap"><span class="diff_add">modulus *r* and the phase angle *phi*. The modulus *r* is the distance</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_38">38+</td><td nowrap="nowrap"><span class="diff_add">from *z* to the origin, while the phase *phi* is the counterclockwise</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_39">39+</td><td nowrap="nowrap"><span class="diff_add">angle, measured in radians, from the positive x-axis to the line</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_40">40+</td><td nowrap="nowrap"><span class="diff_add">segment that joins the origin to *z*.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_37">37</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__6">n</a></td><td class="diff_header" id="from81_38">38-</td><td nowrap="nowrap"><span class="diff_sub"> x := real(z)</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to81__6">n</a></td><td class="diff_header" id="to81_42">42+</td><td nowrap="nowrap"><span class="diff_add">The following functions can be used to convert from the native</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_39">39-</td><td nowrap="nowrap"><span class="diff_sub"> y := imag(z)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_43">43+</td><td nowrap="nowrap"><span class="diff_add">rectangular coordinates to polar coordinates and back.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_40">40</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__7">n</a></td><td class="diff_header" id="from81_41">41-</td><td nowrap="nowrap"><span class="diff_sub">In engineering the polar coordinate system is popular for complex numbers. In</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to81__7">n</a></td><td class="diff_header" id="to81_45">45+</td><td nowrap="nowrap"><span class="diff_add">.. function:: phase(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_42">42-</td><td nowrap="nowrap"><span class="diff_sub">polar coordinates a complex number is defined by the radius *r* and the phase</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_46">46+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_43">43-</td><td nowrap="nowrap"><span class="diff_sub">angle *phi*. The radius *r* is the absolute value of the complex, which can be</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_47">47+</td><td nowrap="nowrap"><span class="diff_add"> Return the phase of *x* (also known as the *argument* of *x*), as a</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_44">44-</td><td nowrap="nowrap"><span class="diff_sub">viewed as distance from (0, 0). The radius *r* is always 0 or a positive float.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_48">48+</td><td nowrap="nowrap"><span class="diff_add"> float. ``phase(x)`` is equivalent to ``math.atan2(x.imag,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_45">45-</td><td nowrap="nowrap"><span class="diff_sub">The phase angle *phi* is the counter clockwise angle from the positive x axis,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_49">49+</td><td nowrap="nowrap"><span class="diff_add"> x.real)``. The result lies in the range [-π, π], and the branch</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_46">46-</td><td nowrap="nowrap"><span class="diff_sub">e.g. *1* has the angle *0*, *1j* has the angle *π/2* and *-1* the angle *-π*.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_50">50+</td><td nowrap="nowrap"><span class="diff_add"> cut for this operation lies along the negative real axis,</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_51">51+</td><td nowrap="nowrap"><span class="diff_add"> continuous from above. On systems with support for signed zeros</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_52">52+</td><td nowrap="nowrap"><span class="diff_add"> (which includes most systems in current use), this means that the</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_53">53+</td><td nowrap="nowrap"><span class="diff_add"> sign of the result is the same as the sign of ``x.imag``, even when</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_54">54+</td><td nowrap="nowrap"><span class="diff_add"> ``x.imag`` is zero::</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_55">55+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_56">56+</td><td nowrap="nowrap"><span class="diff_add"> >>> phase(complex(-1.0, 0.0))</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to81__7"></td><td class="diff_header" id="to81_57">57+</td><td nowrap="nowrap"><span class="diff_add"> 3.1415926535897931</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_58">58+</td><td nowrap="nowrap"><span class="diff_add"> >>> phase(complex(-1.0, -0.0))</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_59">59+</td><td nowrap="nowrap"><span class="diff_add"> -3.1415926535897931</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_60">60+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to81__8"></td><td class="diff_header" id="to81_61">61+</td><td nowrap="nowrap"><span class="diff_add"> .. versionadded:: 2.6</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_62">62+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_47">47</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_48">48</td><td nowrap="nowrap">.. note::</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__8">n</a></td><td class="diff_header" id="from81_49">49-</td><td nowrap="nowrap"><span class="diff_sub"> While :func:`phase` and func:`polar` return *+π* for a negative real they</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_50">50-</td><td nowrap="nowrap"><span class="diff_sub"> may return *-π* for a complex with a very small negative imaginary</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_51">51-</td><td nowrap="nowrap"><span class="diff_sub"> part, e.g. *-1-1E-300j*.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_52">52</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__9">n</a></td><td class="diff_header" id="from81_53">53-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to81__9">n</a></td><td class="diff_header" id="to81_66">66+</td><td nowrap="nowrap"><span class="diff_add"> The modulus (absolute value) of a complex number *x* can be</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_54">54-</td><td nowrap="nowrap"><span class="diff_sub">Definition::</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_67">67+</td><td nowrap="nowrap"><span class="diff_add"> computed using the built-in :func:`abs` function. There is no</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_55">55-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_68">68+</td><td nowrap="nowrap"><span class="diff_add"> separate :mod:`cmath` module function for this operation.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_56">56-</td><td nowrap="nowrap"><span class="diff_sub"> z = r * exp(1j * phi)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_57">57-</td><td nowrap="nowrap"><span class="diff_sub"> z = r * cis(phi)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_58">58-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_59">59-</td><td nowrap="nowrap"><span class="diff_sub"> r := abs(z) := sqrt(real(z)**2 + imag(z)**2)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_60">60-</td><td nowrap="nowrap"><span class="diff_sub"> phi := phase(z) := atan2(imag(z), real(z))</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_61">61-</td><td nowrap="nowrap"><span class="diff_sub"> cis(phi) := cos(phi) + 1j * sin(phi)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_62">62-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_63">63-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_64">64-</td><td nowrap="nowrap"><span class="diff_sub">.. function:: phase(x)</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to81__9"></td><td class="diff_header" id="from81_65">65-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_66">66-</td><td nowrap="nowrap"><span class="diff_sub"> Return phase, also known as the argument, of a complex.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_67">67-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_68">68-</td><td nowrap="nowrap"><span class="diff_sub"> .. versionadded:: 2.6</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_69">69</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_70">70</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_71">71</td><td nowrap="nowrap">.. function:: polar(x)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_72">72</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__10">n</a></td><td class="diff_header" id="from81_73">73-</td><td nowrap="nowrap"><span class="diff_sub"> Convert a :class:`complex` from rectangular coordinates to polar</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to81__10">n</a></td><td class="diff_header" id="to81_73">73+</td><td nowrap="nowrap"><span class="diff_add"> Return the representation of *x* in polar coordinates. Returns a</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_74">74-</td><td nowrap="nowrap"><span class="diff_sub"> coordinates. The function returns a tuple with the two elements</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_74">74+</td><td nowrap="nowrap"><span class="diff_add"> pair ``(r, phi)`` where *r* is the modulus of *x* and phi is the</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to81__10"></td><td class="diff_header" id="from81_75">75-</td><td nowrap="nowrap"><span class="diff_sub"> *r* and *phi*. *r* is the distance from 0 and *phi* the phase</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to81__10"></td><td class="diff_header" id="to81_75">75+</td><td nowrap="nowrap"><span class="diff_add"> phase of *x*. ``polar(x)`` is equivalent to ``(abs(x),</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_76">76-</td><td nowrap="nowrap"><span class="diff_sub"> angle.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_76">76+</td><td nowrap="nowrap"><span class="diff_add"> phase(x))``.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_77">77</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to81__11"></td><td class="diff_header" id="from81_78">78</td><td nowrap="nowrap"> .. versionadded:: 2.6</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_79">79</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_80">80</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_81">81</td><td nowrap="nowrap">.. function:: rect(r, phi)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_82">82</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__11">n</a></td><td class="diff_header" id="from81_83">83-</td><td nowrap="nowrap"><span class="diff_sub"> Convert from polar coordinates to rectangular coordinates and return</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to81__11">n</a></td><td class="diff_header" id="to81_83">83+</td><td nowrap="nowrap"><span class="diff_add"> Return the complex number *x* with polar coordinates *r* and *phi*.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_84">84-</td><td nowrap="nowrap"><span class="diff_sub"> a :class:`complex`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_84">84+</td><td nowrap="nowrap"><span class="diff_add"> Equivalent to ``r * (math.cos(phi) + math.sin(phi)*1j)``.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_85">85</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__12">n</a></td><td class="diff_header" id="to81_86">86+</td><td nowrap="nowrap"><span class="diff_add"> .. versionadded:: 2.6</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_87">87+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_88">88+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_89">89+</td><td nowrap="nowrap"><span class="diff_add">Power and logarithmic functions</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_90">90+</td><td nowrap="nowrap"><span class="diff_add">-------------------------------</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_91">91+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_92">92+</td><td nowrap="nowrap"><span class="diff_add">.. function:: exp(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_93">93+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_94">94+</td><td nowrap="nowrap"><span class="diff_add"> Return the exponential value ``e**x``.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_95">95+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_96">96+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_97">97+</td><td nowrap="nowrap"><span class="diff_add">.. function:: log(x[, base])</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_98">98+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to81__12"></td><td class="diff_header" id="to81_99">99+</td><td nowrap="nowrap"><span class="diff_add"> Returns the logarithm of *x* to the given *base*. If the *base* is not</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_100">100+</td><td nowrap="nowrap"><span class="diff_add"> specified, returns the natural logarithm of *x*. There is one branch cut, from 0</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to81__13"></td><td class="diff_header" id="to81_101">101+</td><td nowrap="nowrap"><span class="diff_add"> along the negative real axis to -∞, continuous from above.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_102">102+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_86">86-</td><td nowrap="nowrap"> .. versiona<span class="diff_chg">dd</span>ed:: 2.<span class="diff_chg">6</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_103">103+</td><td nowrap="nowrap"> .. version<span class="diff_add">ch</span>a<span class="diff_chg">ng</span>ed:: 2.<span class="diff_chg">4</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_104">104+</td><td nowrap="nowrap"><span class="diff_add"> *base* argument added.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_87">87</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_88">88</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__13">n</a></td><td class="diff_header" id="to81_107">107+</td><td nowrap="nowrap"><span class="diff_add">.. function:: log10(x)</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_89">89</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__14">n</a></td><td class="diff_header" id="from81_90">90-</td><td nowrap="nowrap"><span class="diff_sub">cmath functions</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to81__14">n</a></td><td class="diff_header" id="to81_109">109+</td><td nowrap="nowrap"><span class="diff_add"> Return the base-10 logarithm of *x*. This has the same branch cut as</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_110">110+</td><td nowrap="nowrap"><span class="diff_add"> :func:`log`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_111">111+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_112">112+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_113">113+</td><td nowrap="nowrap"><span class="diff_add">.. function:: sqrt(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_114">114+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_115">115+</td><td nowrap="nowrap"><span class="diff_add"> Return the square root of *x*. This has the same branch cut as :func:`log`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_116">116+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_117">117+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_118">118+</td><td nowrap="nowrap"><span class="diff_add">Trigonometric functions</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_91">91-</td><td nowrap="nowrap">---------------</td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_119">119+</td><td nowrap="nowrap">---------------<span class="diff_add">--------</span></td></tr> + <tr><td class="diff_next" id="difflib_chg_to81__14"></td><td class="diff_header" id="from81_92">92</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_93">93</td><td nowrap="nowrap">.. function:: acos(x)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_94">94</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_95">95</td><td nowrap="nowrap"> Return the arc cosine of *x*. There are two branch cuts: One extends right from</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_96">96</td><td nowrap="nowrap"> 1 along the real axis to ∞, continuous from below. The other extends left from</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_97">97</td><td nowrap="nowrap"> -1 along the real axis to -∞, continuous from above.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_98">98</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_99">99</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__15">n</a></td><td class="diff_header" id="to81_128">128+</td><td nowrap="nowrap"><span class="diff_add">.. function:: asin(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_129">129+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_130">130+</td><td nowrap="nowrap"><span class="diff_add"> Return the arc sine of *x*. This has the same branch cuts as :func:`acos`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_131">131+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_132">132+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_133">133+</td><td nowrap="nowrap"><span class="diff_add">.. function:: atan(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_134">134+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_135">135+</td><td nowrap="nowrap"><span class="diff_add"> Return the arc tangent of *x*. There are two branch cuts: One extends from</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_136">136+</td><td nowrap="nowrap"><span class="diff_add"> ``1j`` along the imaginary axis to ``∞j``, continuous from the right. The</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_137">137+</td><td nowrap="nowrap"><span class="diff_add"> other extends from ``-1j`` along the imaginary axis to ``-∞j``, continuous</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_138">138+</td><td nowrap="nowrap"><span class="diff_add"> from the left.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_139">139+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_140">140+</td><td nowrap="nowrap"><span class="diff_add"> .. versionchanged:: 2.6</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_141">141+</td><td nowrap="nowrap"><span class="diff_add"> direction of continuity of upper cut reversed</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_142">142+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_143">143+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_144">144+</td><td nowrap="nowrap"><span class="diff_add">.. function:: cos(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_145">145+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_146">146+</td><td nowrap="nowrap"><span class="diff_add"> Return the cosine of *x*.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_147">147+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_148">148+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_149">149+</td><td nowrap="nowrap"><span class="diff_add">.. function:: sin(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_150">150+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_151">151+</td><td nowrap="nowrap"><span class="diff_add"> Return the sine of *x*.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_152">152+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_153">153+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_154">154+</td><td nowrap="nowrap"><span class="diff_add">.. function:: tan(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_155">155+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_156">156+</td><td nowrap="nowrap"><span class="diff_add"> Return the tangent of *x*.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_157">157+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to81__15"></td><td class="diff_header" id="to81_158">158+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_159">159+</td><td nowrap="nowrap"><span class="diff_add">Hyperbolic functions</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_160">160+</td><td nowrap="nowrap"><span class="diff_add">--------------------</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_161">161+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_100">100</td><td nowrap="nowrap">.. function:: acosh(x)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_101">101</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_102">102</td><td nowrap="nowrap"> Return the hyperbolic arc cosine of *x*. There is one branch cut, extending left</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_103">103</td><td nowrap="nowrap"> from 1 along the real axis to -∞, continuous from above.</td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__16">n</a></td><td class="diff_header" id="from81_104">104-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_105">105-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_106">106-</td><td nowrap="nowrap"><span class="diff_sub">.. function:: asin(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_107">107-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_108">108-</td><td nowrap="nowrap"><span class="diff_sub"> Return the arc sine of *x*. This has the same branch cuts as :func:`acos`.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_109">109</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_110">110</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_111">111</td><td nowrap="nowrap">.. function:: asinh(x)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_112">112</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_113">113</td><td nowrap="nowrap"> Return the hyperbolic arc sine of *x*. There are two branch cuts:</td></tr> <tr><td class="diff_next" id="difflib_chg_to81__16"></td><td class="diff_header" id="from81_114">114</td><td nowrap="nowrap"> One extends from ``1j`` along the imaginary axis to ``∞j``,</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_115">115</td><td nowrap="nowrap"> continuous from the right. The other extends from ``-1j`` along</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_116">116</td><td nowrap="nowrap"> the imaginary axis to ``-∞j``, continuous from the left.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_117">117</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_118">118</td><td nowrap="nowrap"> .. versionchanged:: 2.6</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_119">119</td><td nowrap="nowrap"> branch cuts moved to match those recommended by the C99 standard</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_120">120</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_121">121</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__17">n</a></td><td class="diff_header" id="from81_122">122-</td><td nowrap="nowrap"><span class="diff_sub">.. function:: atan(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_123">123-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_124">124-</td><td nowrap="nowrap"><span class="diff_sub"> Return the arc tangent of *x*. There are two branch cuts: One extends from</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_125">125-</td><td nowrap="nowrap"><span class="diff_sub"> ``1j`` along the imaginary axis to ``∞j``, continuous from the right. The</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_126">126-</td><td nowrap="nowrap"><span class="diff_sub"> other extends from ``-1j`` along the imaginary axis to ``-∞j``, continuous</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_127">127-</td><td nowrap="nowrap"><span class="diff_sub"> from the left.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_128">128-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_129">129-</td><td nowrap="nowrap"><span class="diff_sub"> .. versionchanged:: 2.6</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_130">130-</td><td nowrap="nowrap"><span class="diff_sub"> direction of continuity of upper cut reversed</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_131">131-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_132">132-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_133">133</td><td nowrap="nowrap">.. function:: atanh(x)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_134">134</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_135">135</td><td nowrap="nowrap"> Return the hyperbolic arc tangent of *x*. There are two branch cuts: One</td></tr> <tr><td class="diff_next" id="difflib_chg_to81__17"></td><td class="diff_header" id="from81_136">136</td><td nowrap="nowrap"> extends from ``1`` along the real axis to ``∞``, continuous from below. The</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_137">137</td><td nowrap="nowrap"> other extends from ``-1`` along the real axis to ``-∞``, continuous from</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_138">138</td><td nowrap="nowrap"> above.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_139">139</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_140">140</td><td nowrap="nowrap"> .. versionchanged:: 2.6</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_141">141</td><td nowrap="nowrap"> direction of continuity of right cut reversed</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_142">142</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_143">143</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__18">n</a></td><td class="diff_header" id="from81_144">144-</td><td nowrap="nowrap"><span class="diff_sub">.. function:: cos(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_145">145-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to81__18"></td><td class="diff_header" id="from81_146">146-</td><td nowrap="nowrap"><span class="diff_sub"> Return the cosine of *x*.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_147">147-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to81__19"></td><td class="diff_header" id="from81_148">148-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_149">149</td><td nowrap="nowrap">.. function:: cosh(x)</td></tr> <tr><td class="diff_next" id="difflib_chg_to81__20"></td><td class="diff_header" id="from81_150">150</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_151">151</td><td nowrap="nowrap"> Return the hyperbolic cosine of *x*.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_152">152</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_153">153</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__19">n</a></td><td class="diff_header" id="from81_154">154-</td><td nowrap="nowrap">.. function:: <span class="diff_chg">exp</span>(x)</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to81__19">n</a></td><td class="diff_header" id="to81_195">195+</td><td nowrap="nowrap">.. function:: <span class="diff_chg">sinh</span>(x)</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_155">155</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__20">n</a></td><td class="diff_header" id="from81_156">156-</td><td nowrap="nowrap"><span class="diff_sub"> Return the exponential value ``e**x``.</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to81__20">n</a></td><td class="diff_header" id="to81_197">197+</td><td nowrap="nowrap"><span class="diff_add"> Return the hyperbolic sine of *x*.</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_157">157</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__21">n</a></td><td class="diff_header" id="to81_199">199+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_200">200+</td><td nowrap="nowrap"><span class="diff_add">.. function:: tanh(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_201">201+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_202">202+</td><td nowrap="nowrap"><span class="diff_add"> Return the hyperbolic tangent of *x*.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_203">203+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_204">204+</td><td nowrap="nowrap"><span class="diff_add"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_205">205+</td><td nowrap="nowrap"><span class="diff_add">Classification functions</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_206">206+</td><td nowrap="nowrap"><span class="diff_add">------------------------</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_158">158</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_159">159</td><td nowrap="nowrap">.. function:: isinf(x)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_160">160</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_161">161</td><td nowrap="nowrap"> Return *True* if the real or the imaginary part of x is positive</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_162">162</td><td nowrap="nowrap"> or negative infinity.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_163">163</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_164">164</td><td nowrap="nowrap"> .. versionadded:: 2.6</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_165">165</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next" id="difflib_chg_to81__21"></td><td class="diff_header" id="from81_166">166</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_167">167</td><td nowrap="nowrap">.. function:: isnan(x)</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_168">168</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_169">169</td><td nowrap="nowrap"> Return *True* if the real or imaginary part of x is not a number (NaN).</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_170">170</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_171">171</td><td nowrap="nowrap"> .. versionadded:: 2.6</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_172">172</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_173">173</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__22">n</a></td><td class="diff_header" id="from81_174">174-</td><td nowrap="nowrap"><span class="diff_sub">.. function:: log(x[, base])</span></td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to81__22">n</a></td><td class="diff_header" id="to81_223">223+</td><td nowrap="nowrap"><span class="diff_add">Constants</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_175">175-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="to81_224">224+</td><td nowrap="nowrap"><span class="diff_add">---------</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_176">176-</td><td nowrap="nowrap"><span class="diff_sub"> Returns the logarithm of *x* to the given *base*. If the *base* is not</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_177">177-</td><td nowrap="nowrap"><span class="diff_sub"> specified, returns the natural logarithm of *x*. There is one branch cut, from 0</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_178">178-</td><td nowrap="nowrap"><span class="diff_sub"> along the negative real axis to -∞, continuous from above.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_179">179-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_180">180-</td><td nowrap="nowrap"><span class="diff_sub"> .. versionchanged:: 2.4</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_181">181-</td><td nowrap="nowrap"><span class="diff_sub"> *base* argument added.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_182">182-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_183">183-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_184">184-</td><td nowrap="nowrap"><span class="diff_sub">.. function:: log10(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_185">185-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_186">186-</td><td nowrap="nowrap"><span class="diff_sub"> Return the base-10 logarithm of *x*. This has the same branch cut as</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_187">187-</td><td nowrap="nowrap"><span class="diff_sub"> :func:`log`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_188">188-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_189">189-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_190">190-</td><td nowrap="nowrap"><span class="diff_sub">.. function:: sin(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_191">191-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_192">192-</td><td nowrap="nowrap"><span class="diff_sub"> Return the sine of *x*.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_193">193-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_194">194-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_195">195-</td><td nowrap="nowrap"><span class="diff_sub">.. function:: sinh(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_196">196-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_197">197-</td><td nowrap="nowrap"><span class="diff_sub"> Return the hyperbolic sine of *x*.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_198">198-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_199">199-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_200">200-</td><td nowrap="nowrap"><span class="diff_sub">.. function:: sqrt(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_201">201-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_202">202-</td><td nowrap="nowrap"><span class="diff_sub"> Return the square root of *x*. This has the same branch cut as :func:`log`.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_203">203-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_204">204-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_205">205-</td><td nowrap="nowrap"><span class="diff_sub">.. function:: tan(x)</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_206">206-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_207">207-</td><td nowrap="nowrap"><span class="diff_sub"> Return the tangent of *x*.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_208">208-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_209">209-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_210">210-</td><td nowrap="nowrap"><span class="diff_sub">.. function:: tanh(x)</span></td></tr> +<tr><td class="diff_next" id="difflib_chg_to81__22"></td><td class="diff_header" id="from81_211">211-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_212">212-</td><td nowrap="nowrap"><span class="diff_sub"> Return the hyperbolic tangent of *x*.</span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_213">213-</td><td nowrap="nowrap"><span class="diff_sub"> </span></td></tr> +<tr><td class="diff_next"></td><td class="diff_header" id="from81_214">214-</td><td nowrap="nowrap"><span class="diff_sub">The module also defines two mathematical constants:</span></td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_215">215</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_216">216</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_217">217</td><td nowrap="nowrap">.. data:: pi</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_218">218</td><td nowrap="nowrap"></td></tr><tr><td class="diff_next"><a href="#difflib_chg_to81__top">t</a></td><td class="diff_header" id="from81_219">219-</td><td nowrap="nowrap"> The mathematical constant *<span class="diff_chg">pi</span>*, as a float.</td></tr> +<tr><td class="diff_next"><a href="#difflib_chg_to81__top">t</a></td><td class="diff_header" id="to81_229">229+</td><td nowrap="nowrap"> The mathematical constant *<span class="diff_chg">π</span>*, as a float.</td></tr> + <tr><td class="diff_next"></td><td class="diff_header" id="from81_220">220</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_221">221</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_222">222</td><td nowrap="nowrap">.. data:: e</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_223">223</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_224">224</td><td nowrap="nowrap"> The mathematical constant *e*, as a float.</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_225">225</td><td nowrap="nowrap"></td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_226">226</td><td nowrap="nowrap">.. index:: module: math</td></tr> <tr><td class="diff_next"></td><td class="diff_header" id="from81_227">227</td><td nowrap="nowrap"></td></tr> </tbody> + </table> + <table class="diff" summary="Legends"> + <tr> <th colspan="2"> Legends </th> </tr> + <tr> <td> <table border="" summary="Colors"> + <tr><th> Colors </th> </tr> + <tr><td class="diff_add"> Added </td></tr> + <tr><td class="diff_chg">Changed</td> </tr> + <tr><td class="diff_sub">Deleted</td> </tr> + </table></td> + <td> <table border="" summary="Links"> + <tr><th colspan="2"> Links </th> </tr> + <tr><td>(f)irst change</td> </tr> + <tr><td>(n)ext change</td> </tr> + <tr><td>(t)op</td> </tr> + </table></td> </tr> + </table> +</body> + +</html> ======================================= ***Additional files exist in this changeset.*** ============================================================================== Revision: 8407432b3d Author: Naoki INADA <inada****@klab*****> Date: Sun Feb 20 01:48:09 2011 Log: merge http://code.google.com/p/python-doc-ja/source/detail?r=8407432b3d