Jeremy Hylton [Tue, 11 Aug 1998 19:52:51 +0000 (19:52 +0000)]
Two fixes to find_class:
1. Only DECREF the class's module when the module is retrieved via
PyImport_Import. If it is retrieved from the modules dictionary with
PyDict_GetItem, it is using a borrowed reference.
2. If the module doesn't define the desired class, raise the same
SystemError that pickle.py does instead of returning an AttributeError
(which is cryptic at best).
Also, fix the PyArg_ParseTuple in cpm_loads (the externally visible
loads) function: Use "S" instead of "O" because cStringIO will croak
with a "bad arguments to internal function" if passed anything other
than a string.
Fred Drake [Tue, 11 Aug 1998 18:52:33 +0000 (18:52 +0000)]
Ok, blank.pbm is free to go.
The rest of these are new or replaced. The buttons are now all the same
width. They have the transparency set right. They still need the attention
of a designer. But they work, and we have a real button for the Modules
Index.
Guido van Rossum [Tue, 11 Aug 1998 18:01:32 +0000 (18:01 +0000)]
Use repr() on the filename in EnvironmentError.__str__(). This
displays funny characters, like spaces or control characters, more
clearly (one of my pet peeves in error messages). Also only suppress
the filename if it is None; display it if it is '', since that would
be a genuine (illegal) filename passed in!
Guido van Rossum [Tue, 11 Aug 1998 15:07:39 +0000 (15:07 +0000)]
Patch by Just van Rossum that changes how we search for submodules of
frozen packages. (I *think* this means that we can now have a
built-in module bar that's a submodule of a frozen package foo, by
registering the built-in module with a name "foo.bar" in the table of
builtin modules.)
Fred Drake [Tue, 11 Aug 1998 14:10:40 +0000 (14:10 +0000)]
Add a comment explaining that this script is probably not useful outside the
standard Python documentation, since the mkhowto.sh script is. Let there be
no doubts....
Fred Drake [Tue, 11 Aug 1998 03:14:50 +0000 (03:14 +0000)]
Control when/where navigation bars will appear: top & bottom of each page.
Include an additional button to the module index in the nav. bars if we
generate a module index. Still need a button image, but the ALT text should
do for now.
Barry Warsaw [Mon, 10 Aug 1998 21:46:24 +0000 (21:46 +0000)]
(imenu-example--python-method-regexp): Patch from Christian Tanzer:
"3.67 fixes Imenu as far as classes are concerned, but some default
values for function arguments are still not supported."
Barry Warsaw [Mon, 10 Aug 1998 21:44:37 +0000 (21:44 +0000)]
(py-compute-indentation): Changes to the `t' condition which affect
indetnation of normal statements: The regular expression that searches
for indenting comment lines has been changed to not require a
space/tab after the first `#'. We then explicitly look for
py-block-comment-prefix depending on the value of
py-honor-comment-indentation.
I think this more accurately reflects the documentation for
py-honor-comment-indentation.
Barry Warsaw [Mon, 10 Aug 1998 16:33:12 +0000 (16:33 +0000)]
Huge number of docstring changes, typo fixes, rewordings, GNU standard
conformations, etc., etc. inspired and given by Michael Ernst. These
include error string fixes, moving of comments to docstrings, some
other non-related typos, terminology standardizing (b/w TP and myself,
and b/w myself and myself :-) although more can still be done.
E.g. "outdenting" => "dedenting".
This file's previous log message is bogus. The real change is that
when it gets the path from the registry, it no longer appends the
default path to the end (which would mostly be a duplication).
Different version games:
- MS_DLL_ID is now set to "1.5" instead of "1.5.x" so Mark Hammond's
extensions won't have to be changed.
- FILEVERSION and PRODUCTVERSION are set to 1,5,2,1.
(The last number could be the build# or the alpha release# or so.)
Barry Warsaw [Fri, 7 Aug 1998 22:24:16 +0000 (22:24 +0000)]
(py-execute-region): When temp-names are broken (Emacs 19.34), a
serial number isn't enough to uniquify the temp file name -- what if
two users are on the same machine? Add in the (emacs-pid) to help
further. Should never be tickled on Emacs 20, XEmacs 20, 21.
Clarify that the Python interpreter lock need *not* be held by
PyInterpreterState_New() and PyThreadState_New() -- but that you may
use it to serialize calls to them.
Add built-in string variables 'quit' and 'exit' that display a hint on
how to exit (in a platform dependent way!). We use os.sep to
determine which platform we're on, since I expect that this will work
better for minority platforms.
Add warning that mutable argument defaults are evaluated only once;
with examples and workaround. This keeps coming up, and I believe
that this section in the tutorial may have been (in part) the source
of the confusion. While it didn't show examples with [] for a default,
it also didn't emphasize enough why that would be a bad idea, and
while it did say that defaults are evaluated at the point of function
definition, the example was not relevant for this issue.