]> granicus.if.org Git - python/log
python
24 years agoAnonymous SF bug report #128053 point out that the #ifdef for
Guido van Rossum [Mon, 8 Jan 2001 17:51:55 +0000 (17:51 +0000)]
Anonymous SF bug report #128053 point out that the #ifdef for
including "tmpfile" in the posix_methods[] array is wrong -- should be
HAVE_TMPFILE, not HAVE_TMPNAM.

24 years agoExplain that long options are matched based on a unique prefix rather than
Fred Drake [Mon, 8 Jan 2001 16:05:51 +0000 (16:05 +0000)]
Explain that long options are matched based on a unique prefix rather than
requiring the whole option to be typed out.

This closes SF bug #126863.

24 years agoGetoptError is always initialized with exactly two parameters, so simplify
Fred Drake [Mon, 8 Jan 2001 15:39:32 +0000 (15:39 +0000)]
GetoptError is always initialized with exactly two parameters, so simplify
the constructor.

24 years agoFixed bug which caused HTTPS not to work at all with string URLs
Moshe Zadka [Mon, 8 Jan 2001 07:09:25 +0000 (07:09 +0000)]
Fixed bug which caused HTTPS not to work at all with string URLs

24 years agoFix a silly bug in float_pow. Sorry Tim.
Neil Schemenauer [Mon, 8 Jan 2001 06:29:50 +0000 (06:29 +0000)]
Fix a silly bug in float_pow.  Sorry Tim.

24 years agoThe Python/C API deals in PyObject*, not PyDictObject*.
Fred Drake [Mon, 8 Jan 2001 05:53:53 +0000 (05:53 +0000)]
The Python/C API deals in PyObject*, not PyDictObject*.

24 years agoText.__init__(): Make sure the data parameter is a string (8-bit or
Fred Drake [Mon, 8 Jan 2001 04:04:34 +0000 (04:04 +0000)]
Text.__init__():  Make sure the data parameter is a string (8-bit or
                  Unicode); raise TypeError if not.

This closes SF bug #126866.

24 years agoA few reformats; no logic changes.
Tim Peters [Mon, 8 Jan 2001 04:02:07 +0000 (04:02 +0000)]
A few reformats; no logic changes.

24 years agoLet's hope that three time's a charm...
Guido van Rossum [Mon, 8 Jan 2001 01:26:47 +0000 (01:26 +0000)]
Let's hope that three time's a charm...

Tim discovered another "bug" in my get_line() code: while the comments
said that n<0 was invalid, it was in fact still called with n<0 (when
PyFile_GetLine() was called with n<0).  In that case fortunately
executed the same code as for n==0.

Changed the comment to admit this fact, and changed Tim's MS speed
hack code to use 'n <= 0' as the criteria for the speed hack.

24 years ago18 isn't a prime (duh).
Tim Peters [Mon, 8 Jan 2001 01:17:26 +0000 (01:17 +0000)]
18 isn't a prime (duh).

24 years agoFiddled ms_getline_hack after talking w/ Guido: made clearer that the
Tim Peters [Mon, 8 Jan 2001 00:53:12 +0000 (00:53 +0000)]
Fiddled ms_getline_hack after talking w/ Guido:  made clearer that the
code duplication is to let us get away without a realloc whenever possible;
boosted the init buf size (the cutoff at which we *can* get away without
a realloc) from 100 to 200 so that more files can enjoy this boost; and
allowed other threads to run in all cases.  The last two cost something,
but not significantly:  in my fat test case, less than a 1% slowdown total.
Since my test case has a great many short lines, that's probably the worst
slowdown, too.  While the logic barely changed, there were lots of edits.
This also gets rid of the reference to fp->_cnt, so the last platform
assumption being made here is that fgets doesn't overwrite bytes
capriciously (== beyond the terminating null byte it must write).

24 years agoMS Win32 .readline() speedup, as discussed on Python-Dev. This is a tricky
Tim Peters [Sun, 7 Jan 2001 21:19:34 +0000 (21:19 +0000)]
MS Win32 .readline() speedup, as discussed on Python-Dev.  This is a tricky
variant that never needs to "search from the right".
Also fixed unlikely memory leak in get_line, if string size overflows INTMAX.
Also new std test test_bufio to make sure .readline() works.

24 years agoTim noticed that I had botched get_line_raw(). Looking again, I
Guido van Rossum [Sun, 7 Jan 2001 20:51:39 +0000 (20:51 +0000)]
Tim noticed that I had botched get_line_raw().  Looking again, I
realized that this behavior is already present in PyFile_GetLine(),
which is the only place that needs it.  A little refactoring of that
function made get_line_raw() redundant.

24 years agoAdd more regression tests, including for the import statement variations.
Fred Drake [Sun, 7 Jan 2001 06:02:19 +0000 (06:02 +0000)]
Add more regression tests, including for the import statement variations.
These will detect regression on SF bug #127271 and other import statement
bugs.

24 years agoFix problems with validation of import statement parse trees.
Fred Drake [Sun, 7 Jan 2001 05:59:59 +0000 (05:59 +0000)]
Fix problems with validation of import statement parse trees.
This closes SF bug #127271.

24 years agoThis patch adds a new feature to the builtin charmap codec:
Marc-André Lemburg [Sat, 6 Jan 2001 15:09:57 +0000 (15:09 +0000)]
This patch adds a new feature to the builtin charmap codec:

the mapping dictionaries can now contain 1-n mappings, meaning
that character ordinals may be mapped to strings or Unicode object,
e.g. 0x0078 ('x') -> u"abc", causing the ordinal to be replaced by
the complete string or Unicode object instead of just one character.

Another feature introduced by the patch is that of mapping oridnals to
the emtpy string. This allows removing characters.

The patch is different from patch #103100 in that it does not cause a
performance hit for the normal use case of 1-1 mappings.

Written by Marc-Andre Lemburg, copyright assigned to Guido van Rossum.

24 years agoThis patch adds a new feature to the builtin charmap codec:
Marc-André Lemburg [Sat, 6 Jan 2001 14:59:58 +0000 (14:59 +0000)]
This patch adds a new feature to the builtin charmap codec:

The mapping dictionaries can now contain 1-n mappings, meaning
that character ordinals may be mapped to strings or Unicode object,
e.g. 0x0078 ('x') -> u"abc", causing the ordinal to be replaced by
the complete string or Unicode object instead of just one character.

Another feature introduced by the patch is that of mapping oridnals to
the emtpy string. This allows removing characters.

The patch is different from patch #103100 in that it does not cause a
performance hit for the normal use case of 1-1 mappings.

Written by Marc-Andre Lemburg, copyright assigned to Guido van Rossum.

24 years agoAdded "repeat.py" -- repeatedly execute a shell command (like
Guido van Rossum [Fri, 5 Jan 2001 20:54:07 +0000 (20:54 +0000)]
Added "repeat.py" -- repeatedly execute a shell command (like
watch(1)).  Updated and untabified the README file.

24 years agoConfiguration test for working getc_unlocked() (and flockfile() and
Guido van Rossum [Fri, 5 Jan 2001 14:45:49 +0000 (14:45 +0000)]
Configuration test for working getc_unlocked() (and flockfile() and
funlockfile()).

24 years agoSpeed it up by using readlines(sizehint). It's still slower than
Guido van Rossum [Fri, 5 Jan 2001 14:44:39 +0000 (14:44 +0000)]
Speed it up by using readlines(sizehint).  It's still slower than
other ways of reading input. :-(

In the process, I added an optional bufsize argument to the input()
function and the FileInput class.

24 years agoRestructured get_line() for clarity and speed.
Guido van Rossum [Fri, 5 Jan 2001 14:43:05 +0000 (14:43 +0000)]
Restructured get_line() for clarity and speed.

- The raw_input() functionality is moved to a separate function.

- Drop GNU getline() in favor of getc_unlocked(), which exists on more
  platforms (and is even a tad faster on my system).

24 years agoClarification of new bisect module functions.
Tim Peters [Fri, 5 Jan 2001 08:05:32 +0000 (08:05 +0000)]
Clarification of new bisect module functions.

24 years agoUpdate explanation of the set_location() method to indicate that in
Fred Drake [Fri, 5 Jan 2001 06:44:19 +0000 (06:44 +0000)]
Update explanation of the set_location() method to indicate that in
BTree databases, the key need not be in the database.  Also, tell about
the exception if the key is not in the DB for other DB types.

This closes SF bug #127377.

24 years agoAdd test cases based on RFC 1808. So now we actually have a test suite
Fred Drake [Fri, 5 Jan 2001 05:57:04 +0000 (05:57 +0000)]
Add test cases based on RFC 1808.  So now we actually have a test suite
the urljoin() function, which exercises the urlparse() and urlunparse()
functions as side effects.

(Moshe, why did we have perfectly empty tests checked in for this?)

24 years agourlunparse(): Do not add a leading slash to the path if it is empty.
Fred Drake [Fri, 5 Jan 2001 05:54:41 +0000 (05:54 +0000)]
urlunparse():  Do not add a leading slash to the path if it is empty.

urljoin():  Make this conform to RFC 1808 for all examples given in that
            RFC (both "Normal" and "Abnormal"), so long as that RFC does
            not conflict the older RFC 1630, which also specified
            relative URL resolution.

This closes SF bug #110832 (Jitterbug PR#194).

24 years agoFix signed/unsigned wng. Unfortunately, (unsigned char) << int
Tim Peters [Fri, 5 Jan 2001 00:54:29 +0000 (00:54 +0000)]
Fix signed/unsigned wng.  Unfortunately, (unsigned char) << int
has type int in C.

24 years agoWhen a PyCFunction that takes only positional parameters is called with
Fred Drake [Thu, 4 Jan 2001 22:33:02 +0000 (22:33 +0000)]
When a PyCFunction that takes only positional parameters is called with
an empty keywords dictionary (via apply() or the extended call syntax),
the keywords dict should be ignored.  If the keywords dict is not empty,
TypeError should be raised.  (Between the restructuring of the call
machinery and this patch, an empty dict in this situation would trigger
a SystemError via PyErr_BadInternalCall().)

Added regression tests to detect errors for this.

24 years agoRecognize pyc files even if they don't end in pyc.
Martin v. Löwis [Thu, 4 Jan 2001 20:30:56 +0000 (20:30 +0000)]
Recognize pyc files even if they don't end in pyc.
Patch #103067 with modifications as discussed in email.

24 years agoFix the bugfix for SF bug #127151 -- make sure we map "previous_page" to
Fred Drake [Thu, 4 Jan 2001 15:16:01 +0000 (15:16 +0000)]
Fix the bugfix for SF bug #127151 -- make sure we map "previous_page" to
"previous" and "next_page" to "next".  This way the proper icons are found.

24 years ago__rcmp__() description: Changed to indicate that this is no longer
Fred Drake [Thu, 4 Jan 2001 15:11:48 +0000 (15:11 +0000)]
__rcmp__() description:  Changed to indicate that this is no longer
                         supported as of Python 2.1.  We still need to
                         have an entry for this since it is reasonable
                         for users to want to understand existing code.

This closes SF bug #122715.

24 years agoBased on comments from Guido, do not describe bisect() and insert() as
Fred Drake [Thu, 4 Jan 2001 14:18:55 +0000 (14:18 +0000)]
Based on comments from Guido, do not describe bisect() and insert() as
being "for backward compatibility."  Also revert to using bisect() in the
example, since Guido thinks that is the best recommendation for typical
usage.

24 years agoMarkup nit: Command line options should be marked with \programopt.
Fred Drake [Thu, 4 Jan 2001 05:59:37 +0000 (05:59 +0000)]
Markup nit:  Command line options should be marked with \programopt.

Other minor markup nits fixed.

Make reference to PyErr_Warn() a hyperlink.

24 years agoMarkup nit: Command line options should be marked with \programopt.
Fred Drake [Thu, 4 Jan 2001 05:56:34 +0000 (05:56 +0000)]
Markup nit:  Command line options should be marked with \programopt.

24 years agoFix typo spotted by Detlef Lannert <lannert@users.sourceforge.net>.
Fred Drake [Thu, 4 Jan 2001 05:48:08 +0000 (05:48 +0000)]
Fix typo spotted by Detlef Lannert <lannert@users.sourceforge.net>.

24 years agoAdded information about the interaction of opening a file in append mode
Fred Drake [Thu, 4 Jan 2001 05:16:39 +0000 (05:16 +0000)]
Added information about the interaction of opening a file in append mode
and seek() in the description of seek().

This closes SF bug #126850.

24 years agoMarkup nit: OK and ERR should be marked \constant in running text.
Fred Drake [Thu, 4 Jan 2001 05:14:45 +0000 (05:14 +0000)]
Markup nit:  OK and ERR should be marked \constant in running text.

24 years agoUpdate documentation to include the new functions, and use the more
Fred Drake [Thu, 4 Jan 2001 05:12:52 +0000 (05:12 +0000)]
Update documentation to include the new functions, and use the more
explicitly-named bisect_right() in the example code.

This closes SF bug #127055.

24 years agoDescription of long(): A string parameter is no longer required to be
Fred Drake [Thu, 4 Jan 2001 05:09:16 +0000 (05:09 +0000)]
Description of long():  A string parameter is no longer required to be
                        *decimal*.

This closes SF bug #127273.

24 years agoAdd NotImplemented to the builtin module.
Neil Schemenauer [Thu, 4 Jan 2001 01:48:42 +0000 (01:48 +0000)]
Add NotImplemented to the builtin module.

24 years agoChanges for PEP 208. PyObject_Compare has been rewritten. Instances no
Neil Schemenauer [Thu, 4 Jan 2001 01:48:10 +0000 (01:48 +0000)]
Changes for PEP 208.  PyObject_Compare has been rewritten.  Instances no
longer get special treatment.  The Py_NotImplemented type is here as well.

24 years agoMake long a new style number type. Sequence repeat is now done here
Neil Schemenauer [Thu, 4 Jan 2001 01:46:03 +0000 (01:46 +0000)]
Make long a new style number type.  Sequence repeat is now done here
now as well.

24 years agoMake int a new style number type. Sequence repeat is now done here
Neil Schemenauer [Thu, 4 Jan 2001 01:45:33 +0000 (01:45 +0000)]
Make int a new style number type.  Sequence repeat is now done here
now as well.

24 years agoMake float a new style number type.
Neil Schemenauer [Thu, 4 Jan 2001 01:44:34 +0000 (01:44 +0000)]
Make float a new style number type.

24 years agoMake instances a new style number type. See PEP 208 for details. Instance
Neil Schemenauer [Thu, 4 Jan 2001 01:43:46 +0000 (01:43 +0000)]
Make instances a new style number type.  See PEP 208 for details.  Instance
types no longer get special treatment from abstract.c so more number number
methods have to be implemented.

24 years agoMassive changes as per PEP 208. Read it for details.
Neil Schemenauer [Thu, 4 Jan 2001 01:39:06 +0000 (01:39 +0000)]
Massive changes as per PEP 208.  Read it for details.

24 years agoNo more RCmp.
Neil Schemenauer [Thu, 4 Jan 2001 01:36:50 +0000 (01:36 +0000)]
No more RCmp.

24 years agoSequence repeat works now for in-place multiply with an integer type
Neil Schemenauer [Thu, 4 Jan 2001 01:36:25 +0000 (01:36 +0000)]
Sequence repeat works now for in-place multiply with an integer type
as the left operand.  I don't know if this is a feature or a bug.

24 years ago__rcmp__ no longer gets called on instances. Remove the test for it.
Neil Schemenauer [Thu, 4 Jan 2001 01:34:52 +0000 (01:34 +0000)]
__rcmp__ no longer gets called on instances.  Remove the test for it.

24 years agoNumbers no longer compare smaller than all other types. Fix the only
Neil Schemenauer [Thu, 4 Jan 2001 01:33:41 +0000 (01:33 +0000)]
Numbers no longer compare smaller than all other types.  Fix the only
part of the testsuite that breaks.  The old behavior may be restored.

24 years ago- Add nb_cmp slot for new style nubmers.
Neil Schemenauer [Thu, 4 Jan 2001 01:31:50 +0000 (01:31 +0000)]
- Add nb_cmp slot for new style nubmers.
- Define type flag for new style numbers.
- Add Py_NotImplemented.

24 years agoRemove PyInstance_*BinOp functions.
Neil Schemenauer [Thu, 4 Jan 2001 01:30:34 +0000 (01:30 +0000)]
Remove PyInstance_*BinOp functions.

24 years agoDocument the NotImplemented object.
Neil Schemenauer [Thu, 4 Jan 2001 01:25:50 +0000 (01:25 +0000)]
Document the NotImplemented object.

24 years agoPatch #103012: Update fpectlmodule for current glibc;
Andrew M. Kuchling [Thu, 4 Jan 2001 01:01:12 +0000 (01:01 +0000)]
Patch #103012: Update fpectlmodule for current glibc;
    The _setfpucw() function/macro doesn't seem to exist any more;
    instead there's an _FPU_SETCW macro.

24 years agoActually call the object with an __call__ method, instead of just
Jeremy Hylton [Wed, 3 Jan 2001 23:53:31 +0000 (23:53 +0000)]
Actually call the object with an __call__ method, instead of just
checking if it is callable.  This is the only place in the test suite
where an __call__ method is called.

24 years agoRevised implementation of CALL_FUNCTION and friends.
Jeremy Hylton [Wed, 3 Jan 2001 23:52:36 +0000 (23:52 +0000)]
Revised implementation of CALL_FUNCTION and friends.
More revision still needed.

Much of the code that was in the mainloop was moved to a series of
helper functions.  PyEval_CallObjectWithKeywords was split into two
parts.  The first part now only does argument handling.  The second
part is now named call_object and delegates the call to a
call_(function,method,etc.) helper.

XXX The call_XXX helper functions should be replaced with tp_call
functions for the respective types.

The CALL_FUNCTION implementation contains three kinds of optimization:
1. fast_cfunction and fast_function are called when the arguments on
   the stack can be passed directly to eval_code2() without copying
   them into a tuple.
2. PyCFunction objects are dispatched immediately, because they are
   presumed to occur more often than anything else.
3. Bound methods are dispatched inline.  The method object contains a
   pointer to the function object that will be called.  The function
   is called from within the mainloop, which may allow optimization #1
   to be used, too.

The extened call implementation -- f(*args) and f(**kw) -- are
implemented as a separate case in the mainloop.  This allows the
common case of normal function calls to execute without wasting time
on checks for extended calls, although it does introduce a small
amount of code duplication.

Also, the unused final argument of eval_code2() was removed.  This is
probably the last trace of the access statement :-).

24 years agoTwo new names.
Guido van Rossum [Wed, 3 Jan 2001 23:51:26 +0000 (23:51 +0000)]
Two new names.

24 years agoNew, improved README from Mike Clarkson. Wow!
Guido van Rossum [Wed, 3 Jan 2001 23:50:59 +0000 (23:50 +0000)]
New, improved README from Mike Clarkson.  Wow!

24 years agodict_update has two boundary conditions: a.update(a) and a.update({})
Jeremy Hylton [Wed, 3 Jan 2001 22:34:59 +0000 (22:34 +0000)]
dict_update has two boundary conditions: a.update(a) and a.update({})
Added test for second one.

24 years agofix leak
Jeremy Hylton [Wed, 3 Jan 2001 22:32:16 +0000 (22:32 +0000)]
fix leak

24 years agoThis patch changes the default behaviour of the builtin charmap
Marc-André Lemburg [Wed, 3 Jan 2001 21:29:14 +0000 (21:29 +0000)]
This patch changes the default behaviour of the builtin charmap
codec to not apply Latin-1 mappings for keys which are not found
in the mapping dictionaries, but instead treat them as undefined
mappings.

The patch was originally written by Martin v. Loewis with some
additional (cosmetic) changes and an updated test script
by Marc-Andre Lemburg.

The standard codecs were recreated from the most current files
available at the Unicode.org site using the Tools/scripts/gencodec.py
tool.

This patch closes the bugs #116285 and #119960.

24 years agoUse relative path for outputdir.
Jack Jansen [Wed, 3 Jan 2001 16:44:56 +0000 (16:44 +0000)]
Use relative path for outputdir.

24 years agoFixed a few declarations.
Jack Jansen [Wed, 3 Jan 2001 16:44:27 +0000 (16:44 +0000)]
Fixed a few declarations.

24 years agoMark the "encoding" parameter to ExternalEntityParserCreate() as optional
Fred Drake [Wed, 3 Jan 2001 15:36:25 +0000 (15:36 +0000)]
Mark the "encoding" parameter to ExternalEntityParserCreate() as optional
in the docstring.

24 years agostruct.pack wants H for unsigned shorts, not h.
Jack Jansen [Wed, 3 Jan 2001 11:14:12 +0000 (11:14 +0000)]
struct.pack wants H for unsigned shorts, not h.

24 years agoGot rid of 68K support.
Jack Jansen [Wed, 3 Jan 2001 11:12:21 +0000 (11:12 +0000)]
Got rid of 68K support.
Added optional generation of project files.
Redesigned dialog.

24 years agoUse == rather than cmp(). The return value of cmp() is not well defined when
Neil Schemenauer [Wed, 3 Jan 2001 02:13:26 +0000 (02:13 +0000)]
Use == rather than cmp().  The return value of cmp() is not well defined when
comparing different types.

24 years agoUse numbers that can be accurately represented on binary machines. I hope
Neil Schemenauer [Wed, 3 Jan 2001 01:52:11 +0000 (01:52 +0000)]
Use numbers that can be accurately represented on binary machines.  I hope
this works on all platforms.

24 years agoDo not cache <img> tags for navigation icons as agressively; this fixes
Fred Drake [Tue, 2 Jan 2001 22:08:48 +0000 (22:08 +0000)]
Do not cache <img> tags for navigation icons as agressively; this fixes
bug #127151.

24 years agoRemove (unused) regex imports.
Jack Jansen [Tue, 2 Jan 2001 22:02:45 +0000 (22:02 +0000)]
Remove (unused) regex imports.

24 years agoUse re in stead of regex.
Jack Jansen [Tue, 2 Jan 2001 22:02:02 +0000 (22:02 +0000)]
Use re in stead of regex.

24 years agoMake the test program work outside IDLE.
Guido van Rossum [Tue, 2 Jan 2001 21:22:03 +0000 (21:22 +0000)]
Make the test program work outside IDLE.

24 years agoAdd forgotten import
Andrew M. Kuchling [Tue, 2 Jan 2001 20:56:42 +0000 (20:56 +0000)]
Add forgotten import

24 years agoDuh. Instead of string.whitespace and string.digits, use isspace()
Guido van Rossum [Tue, 2 Jan 2001 20:36:32 +0000 (20:36 +0000)]
Duh.  Instead of string.whitespace and string.digits, use isspace()
and isdigit() methods.

24 years agoImprove description of else clause of the try/except/else statement.
Fred Drake [Tue, 2 Jan 2001 19:22:48 +0000 (19:22 +0000)]
Improve description of else clause of the try/except/else statement.
This closes (again!) bug #127098.

24 years agoAdd Alt-slash to Unix keydefs (I somehow need it on RH 6.2).
Guido van Rossum [Tue, 2 Jan 2001 18:28:52 +0000 (18:28 +0000)]
Add Alt-slash to Unix keydefs (I somehow need it on RH 6.2).
Get rid of assignment to unused self.text.wordlist.

24 years agoAdd more tests for compare and coercion in preparation for the coercion
Neil Schemenauer [Tue, 2 Jan 2001 16:30:31 +0000 (16:30 +0000)]
Add more tests for compare and coercion in preparation for the coercion
overhaul.  Closes SF patch #102878.

24 years agoAdd garbage collection for module objects. Closes patch #102939 and
Neil Schemenauer [Tue, 2 Jan 2001 15:58:27 +0000 (15:58 +0000)]
Add garbage collection for module objects.  Closes patch #102939 and
fixes bug #126345.

24 years agoUpdated for new universal headers (oops... this was loooong due).
Jack Jansen [Mon, 1 Jan 2001 22:58:20 +0000 (22:58 +0000)]
Updated for new universal headers (oops... this was loooong due).

24 years agoMinor clarficiations in the dialogs about which errno file is wanted when (I had...
Jack Jansen [Mon, 1 Jan 2001 22:57:59 +0000 (22:57 +0000)]
Minor clarficiations in the dialogs about which errno file is wanted when (I had also forgotten:-).

24 years agoNew .mcp names for tkinter and imgmodules projects.
Jack Jansen [Mon, 1 Jan 2001 21:51:33 +0000 (21:51 +0000)]
New .mcp names for tkinter and imgmodules projects.

24 years agoFix up an awkward sentence, pointed out by Chris Ryland <cpr@emsoftware.com>.
Fred Drake [Mon, 1 Jan 2001 20:33:06 +0000 (20:33 +0000)]
Fix up an awkward sentence, pointed out by Chris Ryland <cpr@emsoftware.com>.

24 years agoPatch by kragen@pobox.com: When tracing is turned on, lines shorter
Guido van Rossum [Mon, 1 Jan 2001 19:11:07 +0000 (19:11 +0000)]
Patch by kragen@pobox.com: When tracing is turned on, lines shorter
than a pixel don't get drawn at all. If you're building long curves
made of such lines, this is a bad thing.

24 years agoChange documentation of 'else' clause of 'try/except' to make clear that it
Thomas Wouters [Sun, 31 Dec 2000 22:52:59 +0000 (22:52 +0000)]
Change documentation of 'else' clause of 'try/except' to make clear that it
doesn't get triggered by 'return', 'break' or 'continue'. If the
'try-inside-continue' patch does not get accepted before next release, the
'or continue' should be removed ;P

Closes SF patch #103045 and SF bug #127098.

24 years agoReplaced with .mcp projects in Extensions/Imaging
Jack Jansen [Sun, 31 Dec 2000 13:04:21 +0000 (13:04 +0000)]
Replaced with .mcp projects in Extensions/Imaging

24 years agoAdded test case for legal DOM children
Andrew M. Kuchling [Sun, 31 Dec 2000 04:03:27 +0000 (04:03 +0000)]
Added test case for legal DOM children

24 years agoPatch #102485 ] Check for legal children when adding children to a DOM node
Andrew M. Kuchling [Sun, 31 Dec 2000 03:50:23 +0000 (03:50 +0000)]
Patch #102485 ] Check for legal children when adding children to a DOM node

24 years agoChristmas present to myself: changed regrtest in two ways:
Tim Peters [Sat, 30 Dec 2000 22:21:22 +0000 (22:21 +0000)]
Christmas present to myself:  changed regrtest in two ways:
1. When running in verbose mode, if any test happens to pass, print
   a warning that the apparent success may be bogus (stdout isn't
   compared in verbose mode).  Been fooled by that too often.
2. When a test fails because the expected stdout doesn't match the
   actual stdout, print as much of stdout as did match before the
   first failing write.  Else we get failures of the form "expected
   'a', got 'b'" and a glance at the expected output file shows
   500 instances of 'a' -- no idea where it failed, and, as in #1,
   trying to run in verbose mode instead doesn't help because
   stdout isn't compared then.

24 years agoChanged the search path for pyexpat to include all of the expat folder.
Jack Jansen [Fri, 29 Dec 2000 16:07:30 +0000 (16:07 +0000)]
Changed the search path for pyexpat to include all of the expat folder.

24 years agogetopt used to sort the long option names, in an attempt to simplify
Tim Peters [Fri, 29 Dec 2000 02:17:56 +0000 (02:17 +0000)]
getopt used to sort the long option names, in an attempt to simplify
the logic.  That resulted in a bug.  My previous getopt checkin repaired
the bug but left the sorting.  The solution is significantly simpler if
we don't bother sorting at all, so this checkin gets rid of the sort and
the code that relied on it.

24 years agoFred, THIS NEEDS DOCS! The function docstrings tell the tale.
Tim Peters [Fri, 29 Dec 2000 02:06:45 +0000 (02:06 +0000)]
Fred, THIS NEEDS DOCS!  The function docstrings tell the tale.
Christmas present to myself:  the bisect module didn't define what
happened if the new element was already in the list.  It so happens
that it inserted the new element "to the right" of all equal elements.
Since it wasn't defined, among other bad implications it was a mystery
how to use bisect to determine whether an element was already in the
list (I've seen code that *assumed* "to the right" without justification).
Added new methods bisect_left and insort_left that insert "to the left"
instead; made the old names bisect and insort aliases for the new names
bisect_right and insort_right; beefed up docstrings to explain what
these actually do; and added a std test for the bisect module.

24 years agoMerge with 1.8 of pulldom.py:
Martin v. Löwis [Thu, 28 Dec 2000 18:43:02 +0000 (18:43 +0000)]
Merge with 1.8 of pulldom.py:
Use types.UnicodeType if available, not type(u"").

24 years agoMerge changes up to 1.10 from PyXML:
Martin v. Löwis [Thu, 28 Dec 2000 18:40:56 +0000 (18:40 +0000)]
Merge changes up to 1.10 from PyXML:
- implement hasAttribute and hasAttributeNS (1.7)
- Node.replaceChild():  Update the sibling nodes to point to newChild.  Set
  the .nextSibling attribute on oldChild instead of adding a .newChild
  attribute (1.9).

24 years agoFixed snake logo and minus image by Daniel Calvelo.
Guido van Rossum [Wed, 27 Dec 2000 22:26:08 +0000 (22:26 +0000)]
Fixed snake logo and minus image by Daniel Calvelo.

24 years agoMake Traceback header conform to new traceback ("innermost last" ->
Guido van Rossum [Wed, 27 Dec 2000 19:12:58 +0000 (19:12 +0000)]
Make Traceback header conform to new traceback ("innermost last" ->
"most recent call last").

24 years ago(python-font-lock-keywords): Add highlighting of `as' as a keyword,
Barry Warsaw [Wed, 27 Dec 2000 17:41:47 +0000 (17:41 +0000)]
(python-font-lock-keywords): Add highlighting of `as' as a keyword,
but only in "import foo as bar" statements (including optional
preceding `from' clause).

24 years agoFix for SF bug
Tim Peters [Wed, 27 Dec 2000 08:05:05 +0000 (08:05 +0000)]
Fix for SF bug
https://sourceforge.net/bugs/?func=detailbug&bug_id=126863&group_id=5470
"getopt long option handling broken".  Tossed the excruciating logic in
long_has_args in favor of something obviously correct.

24 years agoAdd test case for SF bug
Tim Peters [Wed, 27 Dec 2000 08:03:20 +0000 (08:03 +0000)]
Add test case for SF bug
https://sourceforge.net/bugs/?func=detailbug&bug_id=126863&group_id=5470

24 years agoFix doubled word
Andrew M. Kuchling [Tue, 26 Dec 2000 16:14:32 +0000 (16:14 +0000)]
Fix doubled word

24 years agoRemove redundant reference to tab (since it = 'horizontal tab')
Andrew M. Kuchling [Tue, 26 Dec 2000 16:09:37 +0000 (16:09 +0000)]
Remove redundant reference to tab (since it = 'horizontal tab')

24 years agoMake isspace(chr(32)) return true
Andrew M. Kuchling [Tue, 26 Dec 2000 16:07:59 +0000 (16:07 +0000)]
Make isspace(chr(32)) return true