Two changes:
- Use new Error class (subclass of RuntimeError so is backward
compatible) which is raised when RuntimeError used to be raised.
- Report original attribute name in error messages instead of name
mangled with namespace URL.
Make isinstance() more permissive in what types of arguments it
accepts. Clarify exception messages for isinstance() and
issubclass(). Closes bug #124106.
Tim Peters [Fri, 1 Dec 2000 07:59:35 +0000 (07:59 +0000)]
Made the description of %[udxXo] formats of negative longs in 2.1 more accurate.
I suggested to Guido that %u be deprecated (it seems useless in Python to me).
Fred Drake [Thu, 30 Nov 2000 07:12:54 +0000 (07:12 +0000)]
Use small tables instead of bare \item markers to describe the contents
of return tuples. The bare \item took advantage of an implementation
detail when formatting in LaTeX, and was just wrong when generating HTML.
It also broke the XML conversion scripts, since there was no enclosing
list-like environment to contain them.
Fred Drake [Wed, 29 Nov 2000 15:48:22 +0000 (15:48 +0000)]
In the first discussion showing how to handle exceptions from C, make the
Python equivalent actually equivalent to the C code. Also, in the C code,
place the "goto" statements on a line by themselves for better visibility
of statements that affect control flow.
Fred Drake [Wed, 29 Nov 2000 06:10:22 +0000 (06:10 +0000)]
Substantial re-organization of the DOM documentation. The abstract API
is now separated from the supplied standard implementation. Not all
interfaces are documented yet, but the structure is better set up to do
so.
There is still a lot to do here, but the shape of the documentation is
coming into line.
Fred Drake [Tue, 28 Nov 2000 16:20:50 +0000 (16:20 +0000)]
Use a subclass of buildindex.Node to clean up the HTML and get the
ordering fixed up (this makes sure that "xml.dom" comes before
"xml.dom.minidom" in the Module Index, which was not true before because
some HTML cruft crept into the data structures).
Guido van Rossum [Mon, 27 Nov 2000 22:22:36 +0000 (22:22 +0000)]
Plug a memory leak in com_import_stmt(): the tuple created to hold the
"..." in "from M import ..." was never DECREFed. Leak reported by
James Slaughter and nailed by Barry, who also provided an earlier
version of this patch.
Fred Drake [Wed, 22 Nov 2000 16:06:16 +0000 (16:06 +0000)]
Do not use \verb in the Python documentation -- it makes parsing the LaTeX
sources more difficult and other tools do not always work well with it.
Since we have better markup for this case, just fix it.
Fred Drake [Tue, 21 Nov 2000 22:02:43 +0000 (22:02 +0000)]
testInsertBefore(): Rewritten to actually test insertBefore() somewhat.
testAAA(),
testAAB(): Added checks that the results are right.
testTooManyDocumentElements(): Added code to actually test this.
testCloneElementDeep()
testCloneElementShallow(): Filled these in with test code.
_testCloneElementCopiesAttributes(),
_setupCloneElement(): Helper functions used with the other
testCloneElement*() functions.
testCloneElementShallowCopiesAttributes(): No longer a separate test;
_setupCloneElement() uses _testCloneElementCopiesAttributes() to
test that this is always done.
Fred Drake [Tue, 21 Nov 2000 22:02:22 +0000 (22:02 +0000)]
Reduce the visibility of imported modules for cleaner "from ... import *"
behavior.
Added support for the Attr.ownerElement attribute.
Everywhere: Define constant object attributes in the classes rather than
on the instances during object construction. This reduces the amount of
work needed for object construction and destruction; these need to be
lightweight operations on a DOM.
Node._get_firstChild(),
Node._get_lastChild(): Return None if there are no children (required for
compliance with DOM level 1).
Node.insertBefore(): If refChild is None, append the new node instead of
failing (required for compliance). Also, update the sibling
relationships. Return the inserted node (required for compliance).
Node.appendChild(): Update the parent of the appended node.
Node.replaceChild(): Actually replace the old child! Update the parent
and sibling relationships of both the old and new children. Return
the replaced child (required for compliance).
Node.normalize(): Implemented the normalize() method. Required for
compliance, but missing from the release. Useful for joining
adjacent Text nodes into a single node for easier processing.
Node.cloneNode(): Actually make this work. Don't let the new node share
the instance __dict__ with the original. Do proper recursion if
doing a "deep" clone. Move the attribute cloning out of the base
class, since only Element is supposed to have attributes.
Node.unlink(): Simplify handling of child nodes for efficiency, and
remove the attribute handling since only Element nodes support
attributes.
Attr.cloneNode(): Extend this to clear the ownerElement attribute in
the clone.
Jack Jansen [Sun, 19 Nov 2000 21:53:15 +0000 (21:53 +0000)]
Added MathLib and InterfaceLib. Added Python:Include so #include "package/file.h" works. Moved bits around so now at least Numeric with Distutils builds and instals.
Fred Drake [Fri, 17 Nov 2000 19:44:14 +0000 (19:44 +0000)]
Added information about the %r string formatting conversion. Added note
about the interpretation of radix 0 for int(), and added description of
the optional radix argument for long(). Based on comments from Reuben
Sumner <rasumner@users.sourceforge.net>.
Fred Drake [Fri, 17 Nov 2000 19:05:12 +0000 (19:05 +0000)]
Note that readframes() returns data in linear format, even if the original
is encoded in u-LAW format. Based on suggestion from Anthony Baxter
<anthony_baxter@users.sourceforge.net>.
Tim Peters [Tue, 14 Nov 2000 20:44:53 +0000 (20:44 +0000)]
SF bug 119622: compile errors due to redundant atof decls. I don't understand
the bug report (for details, look at it), but agree there's no need for Python
to declare atof itself: we #include stdlib.h, and ANSI C sez atof is declared
there already.
Guido van Rossum [Mon, 13 Nov 2000 20:29:20 +0000 (20:29 +0000)]
Allow new.function() called with explicit 3rd arg of None, as
documented, and as is reasonable (since it is optional, but there's
another argument following it that may require you to specify a
value). This solves SF bug 121887.
Guido van Rossum [Mon, 13 Nov 2000 19:48:22 +0000 (19:48 +0000)]
Added _HAVE_BSDI and __APPLE__ to the list of platforms that require a
hack for TELL64()... Sounds like there's something else going on
really. Does anybody have a clue I can buy?
Greg Ward [Sat, 11 Nov 2000 02:47:11 +0000 (02:47 +0000)]
Jack Jansen: added 'get_command_list()' method, and Mac-specific code to
use it to generate a dialog for users to specify the command-line (because
providing a command-line with MacPython is so awkward).
Tim Peters [Fri, 10 Nov 2000 19:04:19 +0000 (19:04 +0000)]
Fix for SF bug 117402, crashes on str(array) and repr(array). This was an
unfortunate consequence of somebody switching from PyArg_Parse to
PyArg_ParseTuple but without changing the argument from a NULL to a tuple.
Barry Warsaw [Wed, 8 Nov 2000 22:19:47 +0000 (22:19 +0000)]
SMTP.connect(): If the socket.connect() raises a socket.error, be sure
to call self.close() to reclaim some file descriptors, the reraise the
exception. Closes SF patch #102185 and SF bug #119833.
Fred Drake [Wed, 8 Nov 2000 20:22:59 +0000 (20:22 +0000)]
Remove AC_C_INLINE test from configure.in, since the only place the symbol
occurs in the Python sources appears to be as text in comments. We do not
want to interfere with C++ keywords!