Commit Graph

18085 Commits

Author SHA1 Message Date
Fred Drake 66eed24415 Add some information on the use of \verbatiminput to display sources from
an external file.
2001-06-18 14:59:58 +00:00
Guido van Rossum 183a2f2437 Fix SF bug #433904 (Alex Martelli) - all s_* methods return None only. 2001-06-18 12:33:36 +00:00
Martin v. Löwis f3b30747d6 Patch #413171: Implement get, setdefault, update in terms of
has_key, __getitem__, and __setitem__.
2001-06-18 01:09:41 +00:00
Tim Peters fa9e273442 Clarification in the fp appendix suggested on c.l.py by Michael Chermside.
Also replaced a *star* style emphasis in the Representation Error section
with an \emph{} thingie.
2001-06-17 21:57:17 +00:00
Marc-André Lemburg 4157dd5a92 Fix for bug [ #433047 ] missing args to PyArg_ParseTuple 2001-06-17 18:32:36 +00:00
Guido van Rossum a85e2c8557 SF patch #433619, by Michel Pelletier:
Summary: NAMESPACE support in imaplib.py

Initial Comment:
Support for the IMAP NAMESPACE extension defined in rfc
2342.  This is almost a necessity for working with
modern IMAP servers.
2001-06-17 13:31:25 +00:00
Martin v. Löwis fb73bb129b Synchronize with 1.13 of PyXML:
Allow application to set a new content handler and lex_prop handler during
parsing. Closes bug #433761.
Small hack to make expat be ignored in Jython.
2001-06-17 07:05:43 +00:00
Fred Drake d083839fb4 Instead of initializing & interning the strings passed to the profile
and trace functions lazily, which incurs extra argument pushing and checks
in the C overhead for profiling/tracing, create the strings semi-lazily
when the Python code first registers a profile or trace function.  This
simplifies the trampoline into the profile/trace functions.
2001-06-16 21:02:31 +00:00
Tim Peters 70128a1ba6 PyLong_{As, From}VoidPtr: cleanup, replacing assumptions in comments with
#if/#error constructs.
2001-06-16 08:48:40 +00:00
Martin v. Löwis 918f2c722a Document that filter is added in 2.2. 2001-06-16 08:14:04 +00:00
Tim Peters 83c9edc05c Fix error in comment, and in test_long_api and test_longlong_api remove
the need for the F_ERROR macro.
2001-06-16 08:10:13 +00:00
Tim Peters c605784174 dict_repr: Reuse one of the int vars (minor code simplification). 2001-06-16 07:52:53 +00:00
Tim Peters 52e155e31b Reformat decl of new _PyString_Join. Add NEWS blurb about repr() speedup. 2001-06-16 05:42:57 +00:00
Tim Peters a7259597f1 SF bug 433228: repr(list) woes when len(list) big.
Gave Python linear-time repr() implementations for dicts, lists, strings.
This means, e.g., that repr(range(50000)) is no longer 50x slower than
pprint.pprint() in 2.2 <wink>.

I don't consider this a bugfix candidate, as it's a performance boost.

Added _PyString_Join() to the internal string API.  If we want that in the
public API, fine, but then it requires runtime error checks instead of
asserts.
2001-06-16 05:11:17 +00:00
Tim Peters 239508cd10 SF bug 433228: repr(list) woes when len(list) big
call_object:  If the object isn't callable, display its type in the error
msg rather than its repr.
Bugfix candidate.
2001-06-16 00:09:28 +00:00
Fred Drake 57e52ef076 Implement the \verbatiminput LaTeX macro; this contains more magic than
it should, but only enough that LaTeX2HTML doesn't bite us.
2001-06-15 21:31:57 +00:00
Fred Drake 54d10fd2cd Add a version annotation for the Q and q format codes. 2001-06-15 14:13:07 +00:00
Thomas Wouters 2b30524ea9 Forward-port revision 2.24.2.4 from the release21-maint branch:
Protect several more uses of constants with #ifdefs; these are necessary on
(at least) SCO OpenServer 5. Fixes a non-SF-submitted bugreport by Michael
Kent.
2001-06-15 12:05:44 +00:00
Guido van Rossum b2697005e2 Note that 2.0.1 is also a PSF release. (Gregor Hoffleit, SF #433223.) 2001-06-14 19:36:59 +00:00
Tim Peters cf37dfc3db Change IS_LITTLE_ENDIAN macro -- a little faster now. 2001-06-14 18:42:50 +00:00
Guido van Rossum ad98db1d9e Fix a mis-indentation in _PyUnicode_New() that caused me to stare at
some code for longer than needed.
2001-06-14 17:52:02 +00:00
Fred Drake 8fcd4b5ab3 Fix an improperly placed comma. 2001-06-14 13:57:16 +00:00
Tim Peters ede0509111 _PyLong_AsByteArray: simplify the logic for dealing with the most-
significant digits sign bits.  Again no change in semantics.
2001-06-14 08:53:38 +00:00
Tim Peters ce9de2f79a PyLong_From{Unsigned,}Long: count the # of digits first, so no more space
is allocated than needed (used to allocate 80 bytes of digit space no
matter how small the long input).  This also runs faster, at least on 32-
bit boxes.
2001-06-14 04:56:19 +00:00
Tim Peters ff70d3c8d4 Fixed typo in comment. 2001-06-14 01:11:03 +00:00
Tim Peters e7c1f9b822 Add tests of PyLong_{As,From}{Unsigned,}Long. These are very much like
the new PyLong_{As,From}{Unsigned,}LongLong tests, so the bulk of the
code is in the new #include file testcapi_long.h, which generates
different code depending on how macros are set.  This sucks, but I couldn't
think of anything that sucked less.

UNIX headache?  If we still maintain dependencies by hand, someone who
knows what they're doing should teach whatever needs it that
_testcapimodule.c includes testcapi_long.h.
2001-06-14 00:55:41 +00:00
Tim Peters 17e17d4406 Generalize the new qQ std-mode tests to all int codes (bBhHiIlLqQ).
Unfortunately, the std-mode bBhHIL codes don't do any range-checking; if
and when some of those get fixed, remove their letters from the
IntTester.BUGGY_RANGE_CHECK string.  In the meantime, a msg saying that
range-tests are getting skipped is printed to stdout whenever one is
skipped.
2001-06-13 22:45:27 +00:00
Tim Peters f251d06a66 _PyLong_FromByteArray: changed decl of "carry" to match "thisbyte". No
semantic change, but a bit clearer and may help a really stupid compiler
avoid pointless runtime length conversions.
2001-06-13 21:09:15 +00:00
Tim Peters 05607ad4fd _PyLong_AsByteArray: Don't do the "delicate overflow" check unless it's
truly needed; usually saves a little time, but no change in semantics.
2001-06-13 21:01:27 +00:00
Tim Peters 898cf85c25 _PyLong_AsByteArray: added assert that the input is normalized. This is
outside the function's control, but is crucial to correct operation.
2001-06-13 20:50:08 +00:00
Tim Peters 9cb0c38fff PyLong_As{Unsigned,}LongLong: fiddled final result casting. 2001-06-13 20:45:17 +00:00
Tim Peters 42107c5a0f Record Windows buildno for 2.0.1c1. 2001-06-13 19:17:32 +00:00
Marc-André Lemburg 464fe3aa7b Temporarily disable the message to stderr. Jeremy will know what to do
about this...
2001-06-13 17:18:06 +00:00
Jack Jansen 13a0172658 Got rid of mactoolboxglue.c 2001-06-13 12:41:25 +00:00
Jack Jansen 0c995756b3 Fixed an error in the signature of the QdRGB converter routines. 2001-06-13 12:39:02 +00:00
Tim Peters da9c5b35a3 The new {b,l}p_{u,}longlong() didn't check get_pylong()'s return for NULL.
Repaired that, and added appropriate tests for it to test_struct.py.
2001-06-13 01:26:35 +00:00
Tim Peters d1a7da6c0d longobject.c:
Replaced PyLong_{As,From}{Unsigned,}LongLong guts with calls
    to _PyLong_{As,From}ByteArray.
_testcapimodule.c:
    Added strong tests of PyLong_{As,From}{Unsigned,}LongLong.

Fixes SF bug #432552 PyLong_AsLongLong() problems.
Possible bugfix candidate, but the fix relies on code added to longobject
to support the new q/Q structmodule format codes.
2001-06-13 00:35:57 +00:00
Tim Peters 91621dbcbe The merest start of a test for the PyLong_{As,From}{Unsigned,}LongLong()
functions.  I intend to replace their guts with calls to the new
_PyLong_{As,From}ByteArray() functions, but AFAICT there's no tests for
them at all now; I also suspect PyLong_AsLongLong() isn't catching all
overflow cases, but without a std test to demonstrate that why should you
believe me <wink>.

Also added a raiseTestError() utility function.
2001-06-12 20:10:01 +00:00
Tim Peters 8bc84b4391 _PyLong_{As,From}ByteArray: Minor code rearrangement aimed at improving
clarity.  Should have no effect visible to callers.
2001-06-12 19:17:03 +00:00
Guido van Rossum 83213cc0a0 Add new built-in 'help' which invokes pydoc.help (with a twist). 2001-06-12 16:48:52 +00:00
Marc-André Lemburg da4dbc36c1 Removed the Python version from the PYTHONHOMEHELP string. It was
still set to python2.0 ...
2001-06-12 16:13:51 +00:00
Fred Drake 66a0a0a9b6 Make the option processing more robust.
Add a -F option similar to "cvs commit -F <file>".
Add a -t option to allow specifying the prefix to the directory into which
the docs should be unpacked (useful when I start trying out new styles for
the presentation).
2001-06-12 13:31:37 +00:00
Marc-André Lemburg 8c2133da7b Fix for bug #432384: Recursion in PyString_AsEncodedString? 2001-06-12 13:14:10 +00:00
Fred Drake 4a6c5c568f Fixed reference to table notes for {}.keys() and {}.items() -- these
references did not get updated when the notes were renumbered in a
previous update.

This fixes SF bug #432208.
2001-06-12 03:31:56 +00:00
Tim Peters 7a3bfc3a47 Added q/Q standard (x-platform 8-byte ints) mode in struct module.
This completes the q/Q project.

longobject.c _PyLong_AsByteArray:  The original code had a gross bug:
the most-significant Python digit doesn't necessarily have SHIFT
significant bits, and you really need to count how many copies of the sign
bit it has else spurious overflow errors result.

test_struct.py:  This now does exhaustive std q/Q testing at, and on both
sides of, all relevant power-of-2 boundaries, both positive and negative.

NEWS:  Added brief dict news while I was at it.
2001-06-12 01:22:22 +00:00
Guido van Rossum ac4797a12e Make copy, cut and paste events case insensitive. Reported by Patrick
K. O'Brien on idle-dev.

(Should other bindings follow suit?)
2001-06-12 00:30:33 +00:00
Tim Peters 2a9b367385 Two new private longobject API functions,
_PyLong_FromByteArray
    _PyLong_AsByteArray
Untested and probably buggy -- they compile OK, but nothing calls them
yet.  Will soon be called by the struct module, to implement x-platform
'q' and 'Q'.
If other people have uses for them, we could move them into the public API.
See longobject.h for usage details.
2001-06-11 21:23:58 +00:00
Fred Drake 0b9bc20e66 Add the appropriate availability annotations for the popen*() family of
functions -- these are not available on traditional Mac OS platforms.

Corrected the version annotations for the spawn*() functions and related
constants; these were added in Python 1.6, not 1.5.2.
2001-06-11 18:25:34 +00:00
Tim Peters 2d4e077f23 Trimmed trailing whitespace. 2001-06-11 16:57:33 +00:00
Tim Peters 3023f78819 Simplify some convolution by simply not recognizing 'q' and 'Q' at all
in native mode on platforms that don't HAVE_LONG_LONG.
2001-06-11 16:51:56 +00:00