Barry Warsaw [Mon, 3 Nov 1997 16:59:38 +0000 (16:59 +0000)]
Changes in preparation for integrating into the Python CVS tree.
Introductory comment updates.
(python-font-lock-keywords): Added "assert"
(py-block-closing-keywords-re): New variable.
(py-no-outdent-re): Rewrite to use py-block-closing-keywords-re.
(py-shell): py-process-filter should no longer be necessary. Comint
should do all the work. Note that more fixes to the py-shell process
mechanism need to be done.
(py-execute-region): Check for empty region. Some questionable
changes to set-buffer after shell-command-on-region. Again, this all
needs to be closely examined for X/Emacs 19/20 compatibility.
(py-goto-beyond-final-line): py-parse-partial-sexp-works-p should no
longer be necessary.
(py-statement-closes-block-p): Use py-block-closing-keywords-re.
Guido van Rossum [Fri, 31 Oct 1997 18:38:52 +0000 (18:38 +0000)]
New policy for package imports: only a directory containing
__init__.py (or __init__.pyc/.pyo, whichever applies) is considered a
package. All other subdirectories are left alone. Should make Konrad
Hinsen happy!
Guido van Rossum [Fri, 31 Oct 1997 17:00:30 +0000 (17:00 +0000)]
Hack suggested by Matthias Klose to pull in all relevant entry points
in libmath.a so they are available to mathmodule.so (in case it is
shared). While this still gets triggered on Solaris 2.x, this appears
to be harmless there.
Guido van Rossum [Mon, 27 Oct 1997 18:56:19 +0000 (18:56 +0000)]
This should hopefully finally clean up the remaining __del__ related
problems with this module, even if an instance of a derived class is
kept alive longer than the urllib module itself...
Guido van Rossum [Sun, 26 Oct 1997 17:00:25 +0000 (17:00 +0000)]
Use __dict__.update(state) instead of for loop over state.items() and
call to setattr(). This changes semantics, following the change
already implemented in pickle.
Guido van Rossum [Thu, 23 Oct 1997 22:43:50 +0000 (22:43 +0000)]
New module -- converts regex regular expressions to re style.
There are two ways to use this -- as a filter (e.g. using C-U M-| on a
regex string literal in an Emacs buffer) or from a Python program
which imports this as a module. Read the doc string for more info,
and also some caveats (some cases aren't handled right).
Guido van Rossum [Thu, 23 Oct 1997 19:09:21 +0000 (19:09 +0000)]
Although it's hard to be sure, I *think* this is a working conversion
from regex to re style regular expressions. This should make sgmllib
and htmllib threadsafe, so I can now create a threaded version of
webchecker...
Guido van Rossum [Mon, 20 Oct 1997 23:31:15 +0000 (23:31 +0000)]
Add optional 4th argument to count(), matching find() etc.
Also change all occurrences of "x == None" to "x is None" (not that it
matters much, these functions are all reimplemented in strop -- but
count() is not).
Fred Drake [Wed, 15 Oct 1997 14:37:24 +0000 (14:37 +0000)]
Change Python-as-executable-script example to use "#! /usr/bin/env python"
since that's now the recommended way to do it.
In pickling discussion, change "code{pickle}" (not missing leading "\") to
"This" since the immediately preceeding sentence ended with the same text
(with the proper "\"). Fixes a formatting bug and an odd glitch in the
writing.
Guido van Rossum [Fri, 10 Oct 1997 17:39:19 +0000 (17:39 +0000)]
Darn. When thread support is disabled, the BEGIN/END macros don't
save and restore the tstate, but explicitly calling
PyEval_SaveThread() does reset it! While I think about how to fix
this for real, here's a fix that avoids getting a fatal error.
Put back the extern declaration for strdup(), between #ifndef MS_WINDOWS.
This should make everybody happy, especially since we don't say what
the argument type is (there is disagreement on that, too :-( ).
Change test for re.sub() involving g<...> to use a multi-character
identifier. The previous re.py had a bug that wouldn't show up with
single-char identifier...