Roger E. Masse [Tue, 25 Mar 1997 16:06:03 +0000 (16:06 +0000)]
Added a 'sync' method to shelve. If the underlying database does not have a sync
attribute, this method silently ignores this fact. The default (bsddb's dbhash) does.
Guido van Rossum [Fri, 21 Mar 1997 21:18:16 +0000 (21:18 +0000)]
Removed 'marshal' from the list of "ok" built-in functions -- the
unmarshalling code is actually rather naive and can easily be
caused to crash by feeding it invalid data. This should be fixed in
the marshal module, but I don't have the time to fix it now :-(
Guido van Rossum [Thu, 20 Mar 1997 19:45:51 +0000 (19:45 +0000)]
Ka-Ping Yee's version is better:
Here's a "keyword" module which, in the spirit of "token.py", updates
the list of keywords automatically from a source file (in this case,
"graminit.c" seemed like a reasonable choice, easier than "Grammar/Grammar").
You get "kwlist", a sorted list of keywords; "kwdict", a dictionary
mapping each keyword to 1; and "iskeyword", a function which tells
you if a given string happens to be a keyword.
Guido van Rossum [Fri, 14 Mar 1997 04:23:42 +0000 (04:23 +0000)]
Change PyFPE_END_PROTECT to PyFPE_END_PROTECT(v). v should be the
last variable to which a floating point expression is assigned. The
macro passes its address to a dummy function so that the optimizer
can't delay calculating its value until after the macro.
Guido van Rossum [Tue, 11 Mar 1997 18:42:21 +0000 (18:42 +0000)]
Added support for ``if __debug__:'' -- if -O is given, this form is
recognized by the code generator and code generation for the test and
the subsequent suite is suppressed.
One must write *exactly* ``if __debug__:'' or ``elif __debug__:'' --
no parentheses or operators must be present, or the optimization is
not carried through. Whitespace doesn't matter. Other uses of
__debug__ will find __debug__ defined as 0 or 1 in the __builtin__
module.
Add "extra-verbose" mode, triggered by specifying two -v flags. In
this mode, all tests are run in verbose mode with their output to
stdout. No comparing of output is done.
Much more rigorous testing -- we now try many times, varying in time
of day, day of week, and season.
Fix the weekday predictions -- these seemed to be all bogus. The new
predictions seem to correspond with strftime() on Solaris and IRIX, so
I believe they are correct.
Get rid of the test for non-standard format %C returning "the same as
date(1)". This is hard to do reliably without opening a pipe to date,
and moreover, on IRIX 6.2, %C yields the Century. So we use that
instead. (We don't complain about this in non-verbose mode anyway.)
Jack Jansen [Mon, 24 Feb 1997 13:56:59 +0000 (13:56 +0000)]
- Changed GestaltEqu.h to Gestalt.h
- Changed FragLoader.h to CodeFragments.h
- Removed Desk.h
- Regenerated bgen modules from new universal headers
- Changed some of the s# in PyArg_ParseTuple to m# (unfortunately:
this should have been a different commit)
Jack Jansen [Thu, 20 Feb 1997 15:25:49 +0000 (15:25 +0000)]
- Put USE_MAC_DYNAMIC_LOADING beack here in stead of auto-enabling it
in importdl.c (I had just one crash too many with a static python
importing a dynamic module)
- On powerpc, enable USE_CACHE_ALIGNED with a linesize of 32 bytes.
Guido van Rossum [Tue, 18 Feb 1997 21:53:32 +0000 (21:53 +0000)]
Restructured quite a bit, hopefully Lee Busby will find this useful.
Also grandly renamed.
Here's the new interface:
When WITH_READLINE is defined, two functions are defined:
- PyOS_GnuReadline (what used to be my_readline() with WITH_READLINE)
- PyOS_ReadlineInit (for Dave Ascher)
Always, these functions are defined:
- PyOS_StdioReadline (what used to be my_readline() without WITH_READLINE)
- PyOS_Readline (the interface used by tokenizer.c and [raw_]input().
There's a global function pointer PyOS_ReadlineFunctionPointer,
initialized to NULL. When PyOS_Readline finds this to be NULL, it
sets it to either PyOS_GnuReadline or PyOS_StdioReadline depending on
which one makes more sense (i.e. it uses GNU only if it is defined
*and* stdin is indeed a tty device).
An embedding program that has its own wishes can set the function
pointer to a function of its own design. It should take a char*
prompt argument (which may be NULL) and return a string *ending in a
\n character* -- or "" for EOF or NULL for a user interrupt.
--Guido van Rossum (home page: http://www.python.org/~guido/)
Barry Warsaw [Tue, 18 Feb 1997 18:52:55 +0000 (18:52 +0000)]
Store the current regex syntax along with the regular expression
string as the key to the cache. This means that changing the syntax
will return the correct compiled pattern.
Guido van Rossum [Tue, 18 Feb 1997 16:55:33 +0000 (16:55 +0000)]
Put back #! /usr/local/bin/python. For cgi scripts, /usr/bin/env is
unlikely to find a python binary, as /usr/local/bin is usually not on
the default search path.