Guido van Rossum
1f40cd6314
Add the __doc__ string from the original module on copy_none().
1998-06-09 21:33:44 +00:00
Guido van Rossum
929bd0e02e
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.
1998-06-09 21:25:41 +00:00
Guido van Rossum
dd47ec98e2
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.
1998-06-09 19:49:16 +00:00
Guido van Rossum
e614fb12a0
Changed runs of 8 spaces to tab -- to satisfy the tab nanny.
1998-06-09 19:20:12 +00:00
Guido van Rossum
068ad97330
Untabified -- to satisfy the tab nanny.
1998-06-09 19:19:40 +00:00
Guido van Rossum
5a43e1a90c
Get rid of tabnanny's last complaints.
1998-06-09 19:04:26 +00:00
Guido van Rossum
aa2a7a4ae6
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.
1998-06-09 19:02:21 +00:00
Guido van Rossum
cd5a5f627a
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 "".
1998-06-09 18:58:44 +00:00
Guido van Rossum
5d23758be7
Added docs for strptime().
1998-06-09 16:30:56 +00:00
Guido van Rossum
87ce7bbc39
Added strptime, if it exists. Modified after a patch by Jesse Hallio.
1998-06-09 16:30:31 +00:00
Guido van Rossum
52481484e6
Clarify the type of the signal handler.
1998-06-09 15:42:25 +00:00
Guido van Rossum
4a0144c0de
Should check that PyObject_Str() really returned a string!
1998-06-09 15:08:41 +00:00
Guido van Rossum
fe02efdbf4
getint() now raises ValueError, not TclError, on errors.
1998-06-09 02:37:45 +00:00
Guido van Rossum
795a4bc666
Added a line to process SGI_ABI.
1998-06-08 21:22:12 +00:00
Guido van Rossum
a45cb45965
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.
1998-06-08 20:27:29 +00:00
Guido van Rossum
a63eff6e6a
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.)
1998-05-29 21:37:21 +00:00
Barry Warsaw
fe216b7937
A few minor updates on Emacs mode section
1998-05-29 20:56:34 +00:00
Guido van Rossum
5542449875
Remove the doc string -- it doesn't tell the truth.
1998-05-29 20:08:35 +00:00
Guido van Rossum
0da45c4089
New demo -- Perl style regular expression matching.
...
Slightly more featureful than regexdemo.py.
1998-05-29 19:57:47 +00:00
Guido van Rossum
13c8ef62e6
Say a bit more about .pyc and .pyo files.
1998-05-29 19:12:23 +00:00
Guido van Rossum
3c46234e5e
Remove Emacs and #! cruft.
1998-05-29 18:22:53 +00:00
Guido van Rossum
d659693b5b
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.
1998-05-29 18:08:48 +00:00
Guido van Rossum
a119c0dd5e
Tim's revision of the previous patch. He also added some sparts to
...
the median-of-three code to get a few percent back.
1998-05-29 17:56:32 +00:00
Guido van Rossum
cc20b76ad0
Add comments explaining thread unsafety of this code.
1998-05-29 17:51:59 +00:00
Guido van Rossum
d03e1197cb
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.
1998-05-29 17:51:31 +00:00
Guido van Rossum
b39e461b89
Two places where _time() should be used said time.time(), which
...
doesn't work of course.
1998-05-29 17:47:10 +00:00
Guido van Rossum
6884af706b
Piers Lauders' latest version, with some of my own changes reapplied.
...
Also replaced random()*32000 with randint(0, 31999).
1998-05-29 13:34:03 +00:00
Guido van Rossum
ed6219b116
Fix a whole bunch of error return NULL that should be return -1.
1998-05-29 02:59:33 +00:00
Guido van Rossum
9396673a58
Remove a few unused locals (I love VC++ for this!).
1998-05-29 02:59:00 +00:00
Guido van Rossum
3c8c5981b1
Sorry, the initializer for ob_type must really be NULL,
...
else the damn thing won't compile on Windows :-(
1998-05-29 02:58:20 +00:00
Guido van Rossum
d3ab101fac
Quick fix -- define SIZEOF_LONG and SIZEOF_INT.
1998-05-29 02:53:29 +00:00
Guido van Rossum
3600beefea
Moved from PC
1998-05-29 02:32:57 +00:00
Guido van Rossum
cd3462f1f7
Moving to PCbuild
1998-05-29 02:32:34 +00:00
Guido van Rossum
2a5119b680
On Windows, need #include <windows.h>; and it's MS_WINDOWS, not MS_WIN32.
1998-05-29 01:28:40 +00:00
Guido van Rossum
e4e021bf21
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.
1998-05-29 01:27:07 +00:00
Guido van Rossum
00d93066b0
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().
1998-05-28 23:06:38 +00:00
Guido van Rossum
7e7912f2ca
Protect all uses of the random generator with a lock.
...
Particles break out of their loop when the main loop exits.
1998-05-28 23:02:33 +00:00
Guido van Rossum
3d3a52aa3a
An example of a multi-threaded Tkinter program.
1998-05-28 22:52:01 +00:00
Guido van Rossum
1ad00717fb
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).
1998-05-28 22:48:53 +00:00
Guido van Rossum
ae621ff7b7
Guard against changes in the list size during a compare or sort.
1998-05-28 20:18:46 +00:00
Guido van Rossum
578de30fd7
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).
1998-05-28 20:18:18 +00:00
Guido van Rossum
617c1b0116
Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().
1998-05-28 19:50:02 +00:00
Guido van Rossum
08570decb7
Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().
1998-05-28 19:24:35 +00:00
Jack Jansen
41e825a8f4
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.
1998-05-28 14:22:48 +00:00
Jack Jansen
848250c15b
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).
1998-05-28 14:20:09 +00:00
Fred Drake
d3dbb38e98
get_long(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).
1998-05-28 04:35:49 +00:00
Fred Drake
bebc97fcd7
t_bootstrap(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).
1998-05-28 04:35:12 +00:00
Fred Drake
764b984db5
Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred() == ... in two
...
places.
1998-05-28 04:33:37 +00:00
Jeremy Hylton
2b9d029308
add handler for JPython's org.python.core.PyStringMap object, which
...
walks and quacks like a dictionary.
1998-05-27 22:38:22 +00:00
Guido van Rossum
f638d1c9dd
Fix some comments; move 'import random' to top.
1998-05-26 21:43:44 +00:00