Commit Graph

18238 Commits

Author SHA1 Message Date
Tim Peters 6ee4234802 SF bug #439104: Tuple richcompares has code-typo.
Symptom:  (1, 2, 3) <= (1, 2) returned 1.
This was already fixed in CVS for tuples, but an isomorphic error was in
the list richcompare code.
2001-07-06 17:45:43 +00:00
Fred Drake ed51494666 Fix up a few style nits -- avoid "e.g." and "i.e." -- these make
translation more difficult, as well as reading the English more
difficult for non-native speakers.
2001-07-06 17:28:39 +00:00
Fred Drake beb6713ea7 When reading a continuation line, make sure we still use the transformed
name when filling in the internal data structures, otherwise we incorrectly
raise a KeyError.

This fixes SF bug #432369.
2001-07-06 17:22:48 +00:00
Fred Drake 45c23e61d8 Explain the exit code for the wait() method, including a reference to
the os.W*() functions used to interpret the return value.

This fixes SF bug #429361.
2001-07-06 17:17:12 +00:00
Fred Drake 15e33d828c Fix up a few style nits -- avoid "e.g." and "i.e." -- these make
translation more difficult, as well as reading the English more
difficult for non-native speakers.
2001-07-06 06:49:32 +00:00
Tim Peters 1a7f16ccdf Removed fpectlmodule.c and fpetestmodule.c from the Windows build. They
weren't functional under Windows even if enabled.
2001-07-05 21:19:02 +00:00
Fred Drake bcd1df746d The fpectl module does not work on Windows, so remove Windows from the
\platform statement.

Also fix a minor style consistency nit in an example.
2001-07-05 21:17:08 +00:00
Fred Drake a939911345 Fix a markup error: do not omit a method's parameter list if it is
empty.
2001-07-05 21:14:03 +00:00
Fred Drake dc19163b18 Allow underscores in tag names and quote characters in unquoted attribute
values.  The change for attribute values matches the way Mozilla and
Navigator view the world, at least.

This closes SF bug #436621.
2001-07-05 18:21:57 +00:00
Fred Drake 25211f5724 Added more information on the differences between the htmllib and HTMLParser
modules.
2001-07-05 16:34:36 +00:00
Guido van Rossum 5fe2c139d5 List constraints on xrange() objects. 2001-07-05 15:27:19 +00:00
Guido van Rossum c09cf33658 Rip out tests for xrange() features no longer supported. 2001-07-05 14:49:21 +00:00
Guido van Rossum 643d3916d5 News about xrange(). 2001-07-05 14:46:25 +00:00
Guido van Rossum cfd829eefc Complete the xrange-simplification checkins: call PyRange_New() with
fewer arguments.
2001-07-05 14:44:41 +00:00
Guido van Rossum 3f56166b1a Rip out the fancy behaviors of xrange that nobody uses: repeat, slice,
contains, tolist(), and the start/stop/step attributes.  This includes
removing the 4th ('repeat') argument to PyRange_New().
2001-07-05 13:27:48 +00:00
Just van Rossum 25ddc6330f - minor cleanup, removed bogus comments
- make method reload handle __private attrs correctly
- fixed whole word search
2001-07-05 07:06:26 +00:00
Just van Rossum 924e18e0b8 don't crash when encountering bad marshal data 2001-07-05 07:03:16 +00:00
Tim Peters 0f9431fb18 SF bug #438295: [Windows] __init__.py cause strange behavior
Probable fix (the bug report doesn't have enough info to say for sure).
find_init_module():  Insist on a case-sensitive match for __init__ files.
Given __INIT__.PY instead, find_init_module() thought that was fine, but
the later attempt to do find_module("__INIT__.PY") didn't and its caller
silently suppressed the resulting ImportError.  Now find_init_module()
refuses to accept __INIT__.PY to begin with.
Bugfix candidate; specific to platforms with case-insensitive filesystems.
2001-07-05 03:47:53 +00:00
unknown c90acb9599 Do conversion of CFStrings to/from unicode. 2001-07-04 22:38:52 +00:00
unknown d1054ef31a Set the default 8-bit encoding based on the system script and language. 2001-07-04 22:37:19 +00:00
unknown f428aef3b2 Don't promise mac-japanese encoding as we don't have a codec for it.
Return a reasonable name for the general macos exception (MacOS.Error).
2001-07-04 22:36:27 +00:00
unknown 31569561fd Added a non-recursive implementation of conjoin(), and a Knight's Tour
solver.  In conjunction, they easily found a tour of a 200x200 board:
that's 200**2 == 40,000 levels of backtracking.  Explicitly resumable
generators allow that to be coded as easily as a recursive solver (easier,
actually, because different levels can use level-customized algorithms
without pain), but without blowing the stack.  Indeed, I've never written
an exhaustive Tour solver in any language before that can handle boards so
large ("exhaustive" == guaranteed to find a solution if one exists, as
opposed to probabilistic heuristic approaches; of course, the age of the
universe may be a blip in the time needed!).
2001-07-04 22:11:22 +00:00
unknown a5aa0b5261 dummy checkin for testing, please ignore 2001-07-04 16:52:02 +00:00
unknown fee75ac4e5 Fix for SF bug #425868.
We should not depend on two spaces between words, so use the white
space after the to-be-encoded word only as lookahead and don't
actually consume it in the regular expression.
2001-07-04 10:15:58 +00:00
unknown 67bbd7a773 Clean up a bare except: clause. 2001-07-04 07:07:33 +00:00
unknown 3db163aa19 Clean up a bare except: clause. 2001-07-04 07:01:29 +00:00
Fred Drake fbe7b4fc8c Make the implementations of getElementsByTagName() and
getElementsByTagNameNS() consistent in form as well as functionality
(cosmetic).
2001-07-04 06:25:53 +00:00
Fred Drake ec3dfdee6a Only write out one blank line before the request data.
This closes SF patch #419459.
2001-07-04 05:18:29 +00:00
Kurt B. Kaiser d153a980e5 Null commit with -f option to force an uprev and put HEADs firmly on the trunk. 2001-07-04 03:43:58 +00:00
Kurt B. Kaiser c52dc0b6a3 Null commit with -f option to force an uprev and put HEADs firmly on the trunk. 2001-07-04 03:15:10 +00:00
Fred Drake 9e3ad78444 This change adjusts the profiling/tracing support so that the common
path (with no profile/trace function) through eval_code2() and
eval_frame() avoids several checks.

In the common cases of calls, returns, and exception propogation,
eval_code2() and eval_frame() used to test two values in the
thread-state: the profiling function and the tracing function.  With
this change, a flag is set in the thread-state if either of these is
active, allowing a single check to suffice when both are NULL.  This
also simplifies the code needed when either function is in use but is
already active (to avoid profiling/tracing the profiler/tracer); the
flag is set to 0 when the profile/trace code is entered, allowing the
same check to suffice for "already in the tracer" for call/return/
exception events.
2001-07-03 23:39:52 +00:00
Fredrik Lundh d89a2e7731 bug #416670
added copy/deepcopy support to SRE (still not enabled, since it's not
covered by the test suite)
2001-07-03 20:32:36 +00:00
Fredrik Lundh ee2f18d0ee bug #232815
ch is unsigned, so testing for negative values doesn't make
sense (as noticed by the OpenVMS compiler)
2001-07-03 19:27:05 +00:00
Fred Drake 20006b2d51 Marked the parameters to Stats.print_*() as optional.
This closes SF bug #438032.
2001-07-02 21:22:39 +00:00
Fredrik Lundh df781e6a3f reapplied darryl gallion's minimizing repeat fix. I'm still not 100%
sure about this one, but test #133283 now works even with the fix in
place, and so does the test suite.  we'll see what comes up...
2001-07-02 19:54:28 +00:00
Fred Drake cb9be93955 Add another name. 2001-07-02 17:16:07 +00:00
Fredrik Lundh f71ae461bf pythonware repository roundtrip (untabification) 2001-07-02 17:04:48 +00:00
Fredrik Lundh 19af43d78a added martin's BIGCHARSET patch to SRE 2.1.1. martin reports 2x
speedups for certain unicode character ranges.
2001-07-02 16:58:38 +00:00
Fred Drake 1fb5ce0323 Avoid using os.path.normcase() on sys.path elements; doing so causes paths
to be presented in an unfamiliar case on case-preserving filesystems.

This closes SF patch #436173.
2001-07-02 16:55:42 +00:00
Fredrik Lundh b0f05bdfd3 merged with pythonware's SRE 2.1.1 codebase 2001-07-02 16:42:49 +00:00
Jack Jansen 4542897d96 Added the new unicode defines. Not really tested yet, but Python compiles again at least. 2001-07-02 15:34:57 +00:00
Tim Peters 683ecc7374 Nuke hard tabs. 2001-07-02 04:59:35 +00:00
Tim Peters d1c296537f Whitespace normalization; the plat-riscos file didn't even get by
tabnanny.py.
2001-07-02 04:57:30 +00:00
Tim Peters 8734952a84 Add tentative 2.1.1 Windows build numbers. 2001-07-02 04:08:39 +00:00
Tim Peters 353026663c A clever union-find implementation from c.l.py, due to David Eppstein.
This is another one that leaks memory without an explict clear!  Time to
bite this bullet.
2001-07-02 01:38:33 +00:00
Jack Jansen eefac35594 Added WeakLink...Generator classes (should have done that ages ago). These check the c-function pointer for being NULL before calling it and raise UnimplementedError if it is.
This allows system libs to be weak-linked, thereby allowing us to generate functions that are only available on some OS versions without getting a NULL dereference if the function isn't available.
2001-07-01 22:09:29 +00:00
Jack Jansen 340d98f564 - Use weaklink generators so we can support OSX-only calls without crashing on OS9.
- Convert CFString to/from Python strings. Currently always MacRoman, to be fixed later (as is unicode support). Python->CFString conversion is automatic.
2001-07-01 22:04:02 +00:00
Tim Peters c468fd28b6 Derive an industrial-strength conjoin() via cross-recursion loop unrolling,
and fiddle the conjoin tests to exercise all the new possible paths.
2001-06-30 07:29:44 +00:00
Tim Peters 4efb6e9643 Turns out Neil didn't intend for *all* of his gen-branch work to get
committed.

tokenize.py:  I like these changes, and have tested them extensively
without even realizing it, so I just updated the docstring and the docs.

tabnanny.py:  Also liked this, but did a little code fiddling.  I should
really rewrite this to *exploit* generators, but that's near the bottom
of my effort/benefit scale so doubt I'll get to it anytime soon (it
would be most useful as a non-trivial example of ideal use of generators;
but test_generators.py has already grown plenty of food-for-thought
examples).

inspect.py:  I'm sure Ping intended for this to continue running even
under 1.5.2, so I reverted this to the last pre-gen-branch version.  The
"bugfix" I checked in in-between was actually repairing a bug *introduced*
by the conversion to generators, so it's OK that the reverted version
doesn't reflect that checkin.
2001-06-29 23:51:08 +00:00
Fred Drake 88e66254f9 Use the more conventional "self" as the name of the self parameter in an
example.  It actually confused a reader.
2001-06-29 17:50:57 +00:00