]> granicus.if.org Git - python/log
python
26 years agoSupport new overridable method, isheader() (ESR).
Guido van Rossum [Thu, 11 Jun 1998 13:58:40 +0000 (13:58 +0000)]
Support new overridable method, isheader() (ESR).

Also implement __setitem__(), more-or-less correctly (GvR).

26 years agoEric Raymond: added doc for isheader(); improved docs for constructor.
Guido van Rossum [Thu, 11 Jun 1998 13:50:02 +0000 (13:50 +0000)]
Eric Raymond: added doc for isheader(); improved docs for constructor.

26 years agoDocument the changes I just checked in.
Guido van Rossum [Wed, 10 Jun 1998 21:34:27 +0000 (21:34 +0000)]
Document the changes I just checked in.

26 years agoSome changes suggested/provided by Eric Raymond:
Guido van Rossum [Wed, 10 Jun 1998 21:31:01 +0000 (21:31 +0000)]
Some changes suggested/provided by Eric Raymond:

- explain seekable
- when seekable==1, test fp.tell() and set it to 0 if that fails
- support overridable method iscomment(line) to weed out comments
- check for unread() method on file object before trying to seek

And one of my own:

- Add a get() method which behaves like a dictionary's get(); this is
actually implemented by giving getheader() an optional second argument
to specify the default, and aliasing get to getheader.

26 years agoDocument several variables that were previously undocumented,
Guido van Rossum [Wed, 10 Jun 1998 17:57:44 +0000 (17:57 +0000)]
Document several variables that were previously undocumented,
including the new __stdin__, __stdout__ and __stderr__.
Also moved setttrace around to its proper place in the alphabet.

26 years agoAdd the __doc__ string from the original module on copy_none().
Guido van Rossum [Tue, 9 Jun 1998 21:33:44 +0000 (21:33 +0000)]
Add the __doc__ string from the original module on copy_none().

26 years agoAdded notes about epochs, the year 2038, and a small Y2K disclaimer
Guido van Rossum [Tue, 9 Jun 1998 21:25:41 +0000 (21:25 +0000)]
Added notes about epochs, the year 2038, and a small Y2K disclaimer
(all with index entries!).  Also update the list of functions that
take or yield a time represented as a 9-tuple.

26 years agoDefault content-type to application/x-www-form-urlencoded at the top
Guido van Rossum [Tue, 9 Jun 1998 19:49:16 +0000 (19:49 +0000)]
Default content-type to application/x-www-form-urlencoded at the top
level of a form.  This means that browsers that omit the content-type
header when sending a POST command aren't penalized so heavily.

26 years agoChanged runs of 8 spaces to tab -- to satisfy the tab nanny.
Guido van Rossum [Tue, 9 Jun 1998 19:20:12 +0000 (19:20 +0000)]
Changed runs of 8 spaces to tab -- to satisfy the tab nanny.

26 years agoUntabified -- to satisfy the tab nanny.
Guido van Rossum [Tue, 9 Jun 1998 19:19:40 +0000 (19:19 +0000)]
Untabified -- to satisfy the tab nanny.

26 years agoGet rid of tabnanny's last complaints.
Guido van Rossum [Tue, 9 Jun 1998 19:04:26 +0000 (19:04 +0000)]
Get rid of tabnanny's last complaints.

26 years agoFrom: "Tim Peters" <tim_one@msn.com>
Guido van Rossum [Tue, 9 Jun 1998 19:02:21 +0000 (19:02 +0000)]
From: "Tim Peters" <tim_one@msn.com>

The 1.5.1 tabnanny.py suffers an assert error if fed a script whose last
line is both indented and lacks a newline:

if 1:
    print 'oh fudge' # no newline here:

The attached version repairs that.

26 years agoWhen comparing objects of different types (which is done by comparing
Guido van Rossum [Tue, 9 Jun 1998 18:58:44 +0000 (18:58 +0000)]
When comparing objects of different types (which is done by comparing
the type names), make sure that numeric objects are considered smaller
than all other objects, by forcing their name to "".

26 years agoAdded docs for strptime().
Guido van Rossum [Tue, 9 Jun 1998 16:30:56 +0000 (16:30 +0000)]
Added docs for strptime().

26 years agoAdded strptime, if it exists. Modified after a patch by Jesse Hallio.
Guido van Rossum [Tue, 9 Jun 1998 16:30:31 +0000 (16:30 +0000)]
Added strptime, if it exists.  Modified after a patch by Jesse Hallio.

26 years agoClarify the type of the signal handler.
Guido van Rossum [Tue, 9 Jun 1998 15:42:25 +0000 (15:42 +0000)]
Clarify the type of the signal handler.

26 years agoShould check that PyObject_Str() really returned a string!
Guido van Rossum [Tue, 9 Jun 1998 15:08:41 +0000 (15:08 +0000)]
Should check that PyObject_Str() really returned a string!

26 years agogetint() now raises ValueError, not TclError, on errors.
Guido van Rossum [Tue, 9 Jun 1998 02:37:45 +0000 (02:37 +0000)]
getint() now raises ValueError, not TclError, on errors.

26 years agoAdded a line to process SGI_ABI.
Guido van Rossum [Mon, 8 Jun 1998 21:22:12 +0000 (21:22 +0000)]
Added a line to process SGI_ABI.

26 years agoWhen unmarshalling, add test for negative lengths on strings, tuples
Guido van Rossum [Mon, 8 Jun 1998 20:27:29 +0000 (20:27 +0000)]
When unmarshalling, add test for negative lengths on strings, tuples
and lists; if the size is negative, raise an exception.  Also raise an
exception when an undefined type is found -- all this to increase the
chance that garbage input causes an exception instead of a core dump.

26 years agoAllow assignments to special class attributes -- with typechecks, and
Guido van Rossum [Fri, 29 May 1998 21:37:21 +0000 (21:37 +0000)]
Allow assignments to special class attributes -- with typechecks, and
not in restricted mode.

__dict__ can be set to any dictionary; the cl_getattr, cl_setattr and
cl_delattr slots are refreshed.

__name__ can be set to any string.

__bases__ can be set to to a tuple of classes, provided they are not
subclasses of the class whose attribute is being assigned.

__getattr__, __setattr__ and __delattr__ can be set to anything, or
deleted; the appropriate slot (cl_getattr, cl_setattr, cl_delattr) is
refreshed.

(Note: __name__ really doesn't need to be a special attribute, but
that would be more work.)

26 years agoA few minor updates on Emacs mode section
Barry Warsaw [Fri, 29 May 1998 20:56:34 +0000 (20:56 +0000)]
A few minor updates on Emacs mode section

26 years agoRemove the doc string -- it doesn't tell the truth.
Guido van Rossum [Fri, 29 May 1998 20:08:35 +0000 (20:08 +0000)]
Remove the doc string -- it doesn't tell the truth.

26 years agoNew demo -- Perl style regular expression matching.
Guido van Rossum [Fri, 29 May 1998 19:57:47 +0000 (19:57 +0000)]
New demo -- Perl style regular expression matching.
Slightly more featureful than regexdemo.py.

26 years agoSay a bit more about .pyc and .pyo files.
Guido van Rossum [Fri, 29 May 1998 19:12:23 +0000 (19:12 +0000)]
Say a bit more about .pyc  and .pyo files.

26 years agoRemove Emacs and #! cruft.
Guido van Rossum [Fri, 29 May 1998 18:22:53 +0000 (18:22 +0000)]
Remove Emacs and #! cruft.

26 years agoImprove the self-test code a bit: read a host from sys.argv[1] if set,
Guido van Rossum [Fri, 29 May 1998 18:08:48 +0000 (18:08 +0000)]
Improve the self-test code a bit: read a host from sys.argv[1] if set,
and list the host name when prompting for the password.

26 years agoTim's revision of the previous patch. He also added some sparts to
Guido van Rossum [Fri, 29 May 1998 17:56:32 +0000 (17:56 +0000)]
Tim's revision of the previous patch.  He also added some sparts to
the median-of-three code to get a few percent back.

26 years agoAdd comments explaining thread unsafety of this code.
Guido van Rossum [Fri, 29 May 1998 17:51:59 +0000 (17:51 +0000)]
Add comments explaining thread unsafety of this code.

26 years agoMake gauss() semi-thread-safe. It can still give duplicate results,
Guido van Rossum [Fri, 29 May 1998 17:51:31 +0000 (17:51 +0000)]
Make gauss() semi-thread-safe.  It can still give duplicate results,
but it can no longer raise an exception when called by several threads
simultaneously.

26 years agoTwo places where _time() should be used said time.time(), which
Guido van Rossum [Fri, 29 May 1998 17:47:10 +0000 (17:47 +0000)]
Two places where _time() should be used said time.time(), which
doesn't work of course.

26 years agoPiers Lauders' latest version, with some of my own changes reapplied.
Guido van Rossum [Fri, 29 May 1998 13:34:03 +0000 (13:34 +0000)]
Piers Lauders' latest version, with some of my own changes reapplied.

Also replaced random()*32000 with randint(0, 31999).

26 years agoFix a whole bunch of error return NULL that should be return -1.
Guido van Rossum [Fri, 29 May 1998 02:59:33 +0000 (02:59 +0000)]
Fix a whole bunch of error return NULL that should be return -1.

26 years agoRemove a few unused locals (I love VC++ for this!).
Guido van Rossum [Fri, 29 May 1998 02:59:00 +0000 (02:59 +0000)]
Remove a few unused locals (I love VC++ for this!).

26 years agoSorry, the initializer for ob_type must really be NULL,
Guido van Rossum [Fri, 29 May 1998 02:58:20 +0000 (02:58 +0000)]
Sorry, the initializer for ob_type must really be NULL,
else the damn thing won't compile on Windows :-(

26 years agoQuick fix -- define SIZEOF_LONG and SIZEOF_INT.
Guido van Rossum [Fri, 29 May 1998 02:53:29 +0000 (02:53 +0000)]
Quick fix -- define SIZEOF_LONG and SIZEOF_INT.

26 years agoMoved from PC
Guido van Rossum [Fri, 29 May 1998 02:32:57 +0000 (02:32 +0000)]
Moved from PC

26 years agoMoving to PCbuild
Guido van Rossum [Fri, 29 May 1998 02:32:34 +0000 (02:32 +0000)]
Moving to PCbuild

26 years agoOn Windows, need #include <windows.h>; and it's MS_WINDOWS, not MS_WIN32.
Guido van Rossum [Fri, 29 May 1998 01:28:40 +0000 (01:28 +0000)]
On Windows, need #include <windows.h>; and it's MS_WINDOWS, not MS_WIN32.

26 years agoRelease the interpreter lock for calls that may block: _locking(),
Guido van Rossum [Fri, 29 May 1998 01:27:07 +0000 (01:27 +0000)]
Release the interpreter lock for calls that may block: _locking(),
_getch(), _getche().

Fix bogus error return when open_osfhandle() doesn't have the right
argument list.

26 years agoChanges to make it possible to write multi-threaded programs using
Guido van Rossum [Thu, 28 May 1998 23:06:38 +0000 (23:06 +0000)]
Changes to make it possible to write multi-threaded programs using
Tkinter.  This adds a separate lock -- read the comments.  (This was
also needed for Mark Hammond's attempts to make PythonWin
Tkinter-friendly.)

The changes have affected the EventHook slightly, too; and I've done
some more cleanup of the code that deals with the different versions
of Tcl_CreateFileHandler().

26 years agoProtect all uses of the random generator with a lock.
Guido van Rossum [Thu, 28 May 1998 23:02:33 +0000 (23:02 +0000)]
Protect all uses of the random generator with a lock.
Particles break out of their loop when the main loop exits.

26 years agoAn example of a multi-threaded Tkinter program.
Guido van Rossum [Thu, 28 May 1998 22:52:01 +0000 (22:52 +0000)]
An example of a multi-threaded Tkinter program.

26 years agoPatch by Lars Marius Garshol:
Guido van Rossum [Thu, 28 May 1998 22:48:53 +0000 (22:48 +0000)]
Patch by Lars Marius Garshol:

- Handle <? processing instructions >.

- Allow . and - in entity names.

Also fixed an oversight in the previous fix (in one place, [ \t\r\n]
was used instead of string.whitespace).

26 years agoGuard against changes in the list size during a compare or sort.
Guido van Rossum [Thu, 28 May 1998 20:18:46 +0000 (20:18 +0000)]
Guard against changes in the list size during a compare or sort.

26 years agoSome systems (e.g. Linux) use enums for some symbols (like IPPROTO_IP)
Guido van Rossum [Thu, 28 May 1998 20:18:18 +0000 (20:18 +0000)]
Some systems (e.g. Linux) use enums for some symbols (like IPPROTO_IP)
so that our #ifdef test has the wrong effect.  Substitute hardcoded
values for some important symbols (but not for the whole range -- some
are pretty obscure so it's not worth it).

26 years agoUses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().
Guido van Rossum [Thu, 28 May 1998 19:50:02 +0000 (19:50 +0000)]
Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().

26 years agoUses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().
Guido van Rossum [Thu, 28 May 1998 19:24:35 +0000 (19:24 +0000)]
Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().

26 years agoFor ControlWindow there is a new method do_rawcontrolhit(), which gets
Jack Jansen [Thu, 28 May 1998 14:22:48 +0000 (14:22 +0000)]
For ControlWindow there is a new method do_rawcontrolhit(), which gets
control before TrackControl is called. The default implementation
calls TrackControl and then do_controlhit().

For ScrolledWindow, do_rawcontrol passes a tracker function to
TrackControl if the mouse is in one of the arrows or grey areas, and
the tracker handles scrolling. For the thumb part nothing has changed.

26 years agoAllow an (optional) tracking function (or -1) to be specified to
Jack Jansen [Thu, 28 May 1998 14:20:09 +0000 (14:20 +0000)]
Allow an (optional) tracking function (or -1) to be specified to
TrackControl. TrackControl is now manually generated (too much work to
explain this to bgen).

26 years agoget_long(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).
Fred Drake [Thu, 28 May 1998 04:35:49 +0000 (04:35 +0000)]
get_long():  Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).

26 years agot_bootstrap(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).
Fred Drake [Thu, 28 May 1998 04:35:12 +0000 (04:35 +0000)]
t_bootstrap():  Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).

26 years agoUse PyErr_ExceptionMatches(...) instead of PyErr_Occurred() == ... in two
Fred Drake [Thu, 28 May 1998 04:33:37 +0000 (04:33 +0000)]
Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred() == ... in two
places.

26 years agoadd handler for JPython's org.python.core.PyStringMap object, which
Jeremy Hylton [Wed, 27 May 1998 22:38:22 +0000 (22:38 +0000)]
add handler for JPython's org.python.core.PyStringMap object, which
walks and quacks like a dictionary.

26 years agoFix some comments; move 'import random' to top.
Guido van Rossum [Tue, 26 May 1998 21:43:44 +0000 (21:43 +0000)]
Fix some comments; move 'import random' to top.

26 years agoOn SGI, we need to define _SGI_MP_SOURCE before including errno.h when
Guido van Rossum [Tue, 26 May 1998 18:38:07 +0000 (18:38 +0000)]
On SGI, we need to define _SGI_MP_SOURCE before including errno.h when
we are threading, otherwise accessing errno doesn't work right.

26 years agoTim's quicksort on May 25.
Guido van Rossum [Tue, 26 May 1998 15:06:32 +0000 (15:06 +0000)]
Tim's quicksort on May 25.

26 years agoAdd Tim's worst case scenario.
Guido van Rossum [Tue, 26 May 1998 15:05:12 +0000 (15:05 +0000)]
Add Tim's worst case scenario.
Revert to using whrandom so it will work with older versions of Python.

26 years agoAdded some tests to make sure that long->int conversions near
Guido van Rossum [Tue, 26 May 1998 14:51:55 +0000 (14:51 +0000)]
Added some tests to make sure that long->int conversions near
sys.maxint and near -sys.maxint-1 work correctly.

26 years agoSubject: Buglet in PyLong_AsLong
Guido van Rossum [Tue, 26 May 1998 14:33:37 +0000 (14:33 +0000)]
Subject: Buglet in PyLong_AsLong
From: "Tim Peters" <tim_one@email.msn.com>
To: "Guido van Rossum" <guido@CNRI.Reston.VA.US>
Date: Sat, 23 May 1998 21:45:53 -0400

Guido, the overflow checking in PyLong_AsLong is off a little:

1) If the C in use sign-extends right shifts on signed longs, there's a
spurious overflow error when converting the most-negative int:

Python 1.5.1 (#0, Apr 13 1998, 20:22:04) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> x = -1L << 31
>>> x
-2147483648L
>>> int(x)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
OverflowError: long int too long to convert
>>>

2) If C does not sign-extend, some genuine overflows won't be caught.

The attached should repair both, and, because I installed a new disk and a C
compiler today, it's even been compiled this time <wink>.

Python 1.5.1 (#0, May 23 1998, 20:24:58) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> x = -1L << 31
>>> x
-2147483648L
>>> int(x)
-2147483648
>>> int(-x)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
OverflowError: long int too long to convert
>>> int(-x-1)
2147483647
>>> int(x-1)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
OverflowError: long int too long to convert
>>>

end-casing-ly y'rs  - tim

26 years agoReplaced the VC++ 5.x instructions with a pointer to ../PCbuild.
Guido van Rossum [Tue, 26 May 1998 14:20:15 +0000 (14:20 +0000)]
Replaced the VC++ 5.x instructions with a pointer to ../PCbuild.

26 years agoMoved VC++ 5.x files to ../PCbuild.
Guido van Rossum [Tue, 26 May 1998 14:17:18 +0000 (14:17 +0000)]
Moved VC++ 5.x files to ../PCbuild.

26 years agoMoved VC++ 5.x stuff here.
Guido van Rossum [Tue, 26 May 1998 14:16:23 +0000 (14:16 +0000)]
Moved VC++ 5.x stuff here.

26 years agoMark Hammond writes:
Guido van Rossum [Tue, 26 May 1998 13:53:23 +0000 (13:53 +0000)]
Mark Hammond writes:

Also, here is a new version of import_nt.c, which allows you to register a
Debug module in the registry.  While I was there I removed some of the
ugliness - what was I thinking :-)

26 years agoDon't die if win32api doesn't exist.
Guido van Rossum [Tue, 26 May 1998 02:51:40 +0000 (02:51 +0000)]
Don't die if win32api doesn't exist.

26 years agoFix a dumb typo in the revparse() regular exception: {1-4} should be {1,4}.
Guido van Rossum [Fri, 22 May 1998 19:43:21 +0000 (19:43 +0000)]
Fix a dumb typo in the revparse() regular exception: {1-4} should be {1,4}.
Now you can click on revisions and diffs again!

26 years agoDocument missing functions: xor, not, truth, countOf, indexOf, and
Guido van Rossum [Fri, 22 May 1998 18:48:37 +0000 (18:48 +0000)]
Document missing functions: xor, not, truth, countOf, indexOf, and
(new!) contains.

26 years agoUse a different implementation of EventHook(). The new version
Guido van Rossum [Fri, 22 May 1998 18:28:17 +0000 (18:28 +0000)]
Use a different implementation of EventHook().  The new version
registers an input file handler for stdin with Tcl and handles Tcl
events until something is available on stdin; it then deletes the
handler and returns from EventHook().

This works with or without GNU readline, and doesn't busy-wait.

It still doesn't work for Mac or Windows :-(

26 years agoMinor grammatical correction: "This module perform ..." --> "This module
Fred Drake [Fri, 22 May 1998 18:19:19 +0000 (18:19 +0000)]
Minor grammatical correction:  "This module perform ..." --> "This module
performs ...".

26 years agoFixed spelling in comment: "RFC", not "RFX".
Fred Drake [Fri, 22 May 1998 18:18:08 +0000 (18:18 +0000)]
Fixed spelling in comment:  "RFC", not "RFX".

26 years agoAdd an alias (and preferred name) "contains" for "sequenceIncludes".
Guido van Rossum [Fri, 22 May 1998 18:12:59 +0000 (18:12 +0000)]
Add an alias (and preferred name) "contains" for "sequenceIncludes".

Rationalized the doc strings.

Also simplify the module initialization -- we don't need a __version__
which is set to "$Rev" :-) and we don't need a fatal error when the
initialization fails.

26 years agointroduce a new platform-specific variable: os.linesep is the
Guido van Rossum [Fri, 22 May 1998 15:26:04 +0000 (15:26 +0000)]
introduce a new platform-specific variable: os.linesep is the
platform's line separator.  \n on Unix, \r\n on DOS, OS/2 and Windows,
\r on Macs.

26 years agoAddress some gcc -Wall warnings (e.g. include <ctype.h>).
Guido van Rossum [Fri, 22 May 1998 15:23:36 +0000 (15:23 +0000)]
Address some gcc -Wall warnings (e.g. include <ctype.h>).

Make sure that no tp_as_numbers->nb_<whatever> function is called
without checking for a NULL pointer.  Marc-Andre Lemburg will love it!
(Except that he's just rewritten all this code for a different
approach to coercions ;-( )

26 years agoChange the last 4-space indent into a 1-tab indent.
Guido van Rossum [Fri, 22 May 1998 15:05:36 +0000 (15:05 +0000)]
Change the last 4-space indent into a 1-tab indent.

26 years agoShouldn't use newdir.dir(), which no longer exists!
Guido van Rossum [Fri, 22 May 1998 14:11:57 +0000 (14:11 +0000)]
Shouldn't use newdir.dir(), which no longer exists!

26 years agoI think there was a tiny bug in new_function() -- the 'defaults'
Guido van Rossum [Fri, 22 May 1998 00:57:31 +0000 (00:57 +0000)]
I think there was a tiny bug in new_function() -- the 'defaults'
argument was initialized to Py_None, but later checked for NULL.
Consistently use Py_None.

26 years agoAdd PyErr_PrintEx and PySequence_Contains.
Guido van Rossum [Fri, 22 May 1998 00:56:20 +0000 (00:56 +0000)]
Add PyErr_PrintEx and PySequence_Contains.

26 years agoMake function objects somewhat mutable -- the members func_code,
Guido van Rossum [Fri, 22 May 1998 00:55:34 +0000 (00:55 +0000)]
Make function objects somewhat mutable -- the members func_code,
func_defaults and func_doc (alias __doc__) may be assigned to.  For
the first two, there's a type restriction to code object and tuple,
respectively.

26 years agoPySequence_In() -> PySequence_Contains().
Guido van Rossum [Fri, 22 May 1998 00:54:16 +0000 (00:54 +0000)]
PySequence_In() -> PySequence_Contains().

26 years agoMake sure that no use of a function pointer gotten from a
Guido van Rossum [Fri, 22 May 1998 00:53:47 +0000 (00:53 +0000)]
Make sure that no use of a function pointer gotten from a
tp_as_sequence or tp_as_mapping structure is made without checking it
for NULL first.

26 years agoIn PyObject_IsTrue(), don't call function pointers that are NULL
Guido van Rossum [Fri, 22 May 1998 00:53:24 +0000 (00:53 +0000)]
In PyObject_IsTrue(), don't call function pointers that are NULL
(nb_nonzero, mp_length, sq_length).

26 years agoMoved cmp_member() to abstract.c, as PySequence_Contains() [with
Guido van Rossum [Fri, 22 May 1998 00:52:29 +0000 (00:52 +0000)]
Moved cmp_member() to abstract.c, as PySequence_Contains() [with
swapped arguments].

Also make sure that no use of a function pointer gotten from a
tp_as_sequence or tp_as_mapping structure is made without checking it
for NULL first.

26 years agoA bunch of functions are now properly implemented in abstract.c, and
Guido van Rossum [Fri, 22 May 1998 00:51:39 +0000 (00:51 +0000)]
A bunch of functions are now properly implemented in abstract.c, and
the code here becomes much simpler.  In particular: abs(), divmod(),
pow(), int(), long(), float(), len(), tuple(), list().

Also make sure that no use of a function pointer gotten from a
tp_as_sequence or tp_as_mapping structure is made without checking it
for NULL first.

A few other cosmetic things, such as properly reindenting slice().

26 years agoRenamed PySequence_In() to PySequence_Contains().
Guido van Rossum [Fri, 22 May 1998 00:47:25 +0000 (00:47 +0000)]
Renamed PySequence_In() to PySequence_Contains().

26 years agoCompletely reformatted, standardizing indentation as well as
Guido van Rossum [Fri, 22 May 1998 00:47:05 +0000 (00:47 +0000)]
Completely reformatted, standardizing indentation as well as
programming style.

Recoded many routines to incorporate better error checking, and/or
better versions of the same function found elsewhere
(e.g. bltinmodule.c or ceval.c).  In particular,
Py_Number_{Int,Long,Float}() now convert from strings, just like the
built-in functions int(), long() and float().

Sequences and mappings are now safe to have NULL function pointers
anywhere in their tp_as_sequence or tp_as_mapping fields.  (A few
places in other files need to be checked in too.)

Renamed PySequence_In() to PySequence_Contains().

26 years agoknownfiles: Add the default installation dirs for Apache
Fred Drake [Thu, 21 May 1998 13:15:45 +0000 (13:15 +0000)]
knownfiles:  Add the default installation dirs for Apache
versions <= 1.2, >= 1.3.

26 years agoTrivial little change: when setting a member to an object, hold the
Guido van Rossum [Wed, 20 May 1998 22:25:32 +0000 (22:25 +0000)]
Trivial little change: when setting a member to an object, hold the
old value in a temporary and XDECREF it only after then new value has
been set.  This prevents the (unlikely) case where the destructor of
the member uses the containing object -- it would find it in an
undefined state.

26 years agoAdded support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake [Wed, 20 May 1998 21:32:09 +0000 (21:32 +0000)]
Added support for AMK's {definitions} environment; thanks for the reminder!

26 years agoAdded {definitions} environment, which has \term to define indivual terms.
Fred Drake [Wed, 20 May 1998 17:42:17 +0000 (17:42 +0000)]
Added {definitions} environment, which has \term to define indivual terms.
Similar to {description}.

26 years agowhrandom -> random
Guido van Rossum [Wed, 20 May 1998 17:13:01 +0000 (17:13 +0000)]
whrandom -> random

26 years agoUse random instead of whrandom.
Guido van Rossum [Wed, 20 May 1998 17:05:52 +0000 (17:05 +0000)]
Use random instead of whrandom.

26 years agoAdd Interfaces to replace remaining needs for importing whrandom.
Guido van Rossum [Wed, 20 May 1998 16:28:24 +0000 (16:28 +0000)]
Add Interfaces to replace remaining needs for importing whrandom.
# XXX TO DO: make the distribution functions below into methods.

26 years agoAdd LDLAST to the list of variables processed by the sed script.
Guido van Rossum [Wed, 20 May 1998 15:53:22 +0000 (15:53 +0000)]
Add LDLAST to the list of variables processed by the sed script.

26 years agoCorrect bug doc string (discovered by Berthold Hoellmann):
Guido van Rossum [Wed, 20 May 1998 15:50:56 +0000 (15:50 +0000)]
Correct bug doc string (discovered by Berthold Hoellmann):
get_line_buffer() does not take an optional argument.

26 years agoGet rid of nearly all clals to self._do -- turns out self.tk.call can
Guido van Rossum [Tue, 19 May 1998 21:18:13 +0000 (21:18 +0000)]
Get rid of nearly all clals to self._do -- turns out self.tk.call can
be used just as well, so this saves one Python call in many cases!

26 years agoUse whrandom instead of rand.
Guido van Rossum [Tue, 19 May 1998 21:16:10 +0000 (21:16 +0000)]
Use whrandom instead of rand.

Run 500 steps instead of forever.

26 years agoProtection agains non-existing subdirectories for clean and clobber
Guido van Rossum [Tue, 19 May 1998 21:15:03 +0000 (21:15 +0000)]
Protection agains non-existing subdirectories for clean and clobber
targets.  On some platforms this would cause an infinite Make
recursion.  Also remove "Doc" from the SUBDIRSTOO variable, since it
no longer exists in the standard distribution.

26 years agoAdditions for Mark Hammond's Win32 specific hacks.
Guido van Rossum [Tue, 19 May 1998 20:18:37 +0000 (20:18 +0000)]
Additions for Mark Hammond's Win32 specific hacks.

26 years agoDon't use a separate node for footnotes; see if people scream. ;-)
Fred Drake [Tue, 19 May 1998 19:38:49 +0000 (19:38 +0000)]
Don't use a separate node for footnotes; see if people scream.  ;-)

26 years agoFix definition of release_version (global).
Fred Drake [Tue, 19 May 1998 19:37:55 +0000 (19:37 +0000)]
Fix definition of release_version (global).