Commit Graph

5307 Commits

Author SHA1 Message Date
Guido van Rossum 55702f8d6a Jim's latest version. 1997-01-06 22:57:52 +00:00
Guido van Rossum 635abd24f0 Check for duplicate keyword arguments at compile time. 1997-01-06 22:56:52 +00:00
Guido van Rossum 8f49e12a0e Make builtin_module_names a tuple instead of a list. 1997-01-06 22:55:54 +00:00
Guido van Rossum 541cdd84ac Fix overflow test for multiply to catch some cases it missed.
Added warning about dependency of float/complex hash on int hash.
1997-01-06 22:53:20 +00:00
Guido van Rossum d81a1baa5f Jim's latest version 1997-01-06 22:50:12 +00:00
Barry Warsaw d4ff1b908b New strop_joinfields implementation, highly optimized for Lists. All
other sequences use the Sequence protocol from the abstract API.  The
algorithm has changed so that only one pass through the sequences are
made.
1997-01-06 22:48:32 +00:00
Barry Warsaw 95f92dfad4 New output file for strop test 1997-01-06 22:46:45 +00:00
Barry Warsaw da0e520bc0 Added a couple of strop.join() tests for large lists and long items
within the lists (new output file to be checked in shortly).
1997-01-06 22:46:07 +00:00
Barry Warsaw 9c5494a1b9 added PyTuple_GET_SIZE macro 1997-01-06 22:44:27 +00:00
Barry Warsaw accfb849f9 added PyString_GET_SIZE macro
for both PyString_GET_SIZE and PyString_AS_STRING, cast first argument
to a PyStringObject*
1997-01-06 22:42:50 +00:00
Barry Warsaw 1f2bd07aed added PyList_GET_SIZE macro
for both PyList_GET_SIZE and PyList_GET_ITEM, cast first argument to a
PyListObject*
1997-01-06 22:42:00 +00:00
Guido van Rossum e0548b8da7 Rewrote translate() as follows:
- 'delete' is a C++ keyword; use 'del_table' instead
	- apply Py_CHARMASK() to del_table[i] before using it as an index
	  *** this fixes a bug that was just reported on the list ***
	- if the translation didn't make any changes, INCREF and return
	  the original string
	- when del_table is empty or omitted, don't copy the translation
	  table to a table of ints (should be a bit faster)

Rewrote maketrans() to avoid copying the table (2-3% faster).
1997-01-06 16:50:09 +00:00
Barry Warsaw 04d2d15b6b strop_upper(), strop_lower(): shared code version caused to much of a
performance hit.  Urg.  Reverted.

strop_joinfields(): re-instate optimizations for lists and tuples, but
support arbitrary other kinds of sequences as well.
1997-01-03 23:46:51 +00:00
Guido van Rossum 7fc0bf8247 Fix the following bug:
- When dragging the mouse in either listbox, the *first* entry
clicked on is selected rather than the last (but the last one is
highlighted).

This is done by changing the bindtags so that our binding is executed
after the default binding (which sets the 'active' index to the last
item selected), and using 'active' instead of 'anchor' as the index to
ask for.
1997-01-03 23:39:26 +00:00
Roger E. Masse bf0c3ca9bd Renamed but not well tested. 1997-01-03 23:00:51 +00:00
Roger E. Masse 32e949d1f2 This is a very inobstrusive test for the existance of the SGI cd module
and all it's attributes.  More comprehensive examples can be found in
Demo/cd and require that you have a CD and a CD ROM drive
1997-01-03 23:00:13 +00:00
Roger E. Masse 5150542b8f Output file for test_cd.py 1997-01-03 22:58:43 +00:00
Barry Warsaw e8fc29cde7 Several changes:
- split_whitespace(): slightly better memory ref handling when errors
  occur.

- strop_joinfields(): First argument can now be any sequence-protocol
  conformant object.

- strop_find(), strop_rfind(): Use PyArg_ParseTuple for optional
  arguments

- strop_lower(), strop_upper(): Factor logic into a common function
  do_casechange().

- strop_atoi(), strop_atol(): Use PyArg_ParseTuple.

- strop_maketrans(): arguments used to be optional, although the
  documentation doesn't reflect this.  Make the source conform to the
  docs.  Arguments are required, but two empty strings will return the
  identity translation table.

- General pass fixing up formatting, and checking for return values.
1997-01-03 22:45:34 +00:00
Guido van Rossum 9d1a02ce33 Some small changes.
Raise ImportError instead of SystemExit when $DISPLAY is not set, so
regrtest.py will do the right thing.

Add a call to gl.clear() to clear the window before drawing in it.

Add some verbose prints for completeness.

Use gl.v2i() for the coordinates of one of the lines, for a little bit
of variety.

Reduce the time the window is displayed from 5 to 2 seconds.
1997-01-03 22:42:08 +00:00
Roger E. Masse a2a8b27221 Renamed, but not throughly tested. 1997-01-03 22:40:34 +00:00
Roger E. Masse 4a9ac0612d Output file for test_al.py 1997-01-03 22:39:31 +00:00
Roger E. Masse 1f983df3bd This is a very inobstrusive test for the existance of the al module and all
it's attributes.  More comprehensive examples can be found in Demo/al
1997-01-03 22:39:03 +00:00
Roger E. Masse 7ba4c07768 Renamed, but untested. 1997-01-03 22:17:11 +00:00
Guido van Rossum 9bc7e0af50 Added PyLong*UnsignedLong and PyCobject interfaces. 1997-01-03 21:05:44 +00:00
Barry Warsaw d44be3fdb7 very minor typo 1997-01-03 20:19:05 +00:00
Barry Warsaw 61bc874b19 Output of socket module test. 1997-01-03 20:04:09 +00:00
Barry Warsaw cf3d4b5123 Test of the socket module. The following functions and methods are
not currently tested (or even touched):

#	socket.fromfd()
# 	sktobj.getsockopt()
#	sktobj.recvfrom()
#	sktobj.sendto()
#	sktobj.setblocking()
# 	sktobj.setsockopt()
#	sktobj.shutdown()
1997-01-03 20:03:32 +00:00
Roger E. Masse eaa6e1102f Renamed, reindented. (was already partially complete) 1997-01-03 19:26:27 +00:00
Guido van Rossum 653071731a 'I' and 'L' now always return a Python long. 1997-01-03 19:21:53 +00:00
Guido van Rossum b0b8181622 Added unsigned data formats (B, H, I, L). 1997-01-03 19:20:52 +00:00
Roger E. Masse 7a61f871a7 Updated to include the verbose flag from test_support 1997-01-03 19:20:17 +00:00
Guido van Rossum 549ab711aa Add new formats B, H, I, L for unsigned data types (analogous to the
recent changes in the struct module).
1997-01-03 19:09:47 +00:00
Guido van Rossum 6c87ecaff1 Changed the ``add/sub_offset'' hacks for dealing with C's unsigned
int/long types, and use the new PyLong_FromUnsignedLong() and
PyLong_AsUnsignedLong() interfaces instead.

Semantic change: the 'I' format will now always return a long int.
1997-01-03 19:08:16 +00:00
Guido van Rossum 04ebf5ca5d Change the ``calcsize*3'' test to be portable to 64-bit machines. 1997-01-03 19:00:37 +00:00
Roger E. Masse 5b0eba3ced Reindented. 1997-01-03 18:51:01 +00:00
Barry Warsaw 752300bbdf Check of return values and proper error handling. 1997-01-03 17:18:10 +00:00
Guido van Rossum 53756b1097 Added PyLong_FromUnsignedLong() and PyLong_AsUnsignedLong(). 1997-01-03 17:14:46 +00:00
Barry Warsaw 461a1c172f Output for signal module test 1997-01-03 16:01:20 +00:00
Guido van Rossum 042a05172f Add $(srcdir) in front of the test program's name (else it won't work
when $(srcdir) isn't '.', i.e. when using VPATH).
1997-01-03 15:54:36 +00:00
Guido van Rossum b9d338cbfb Fill pad bytes with zeros (fixing a bug dating from the very first version!). 1997-01-03 15:40:33 +00:00
Guido van Rossum dbadd558b5 Describe standard float/double support.
Rewrite example to be an interactive session
1997-01-03 04:20:09 +00:00
Barry Warsaw b9a781e177 Scratch the ears of gcc -Wall. 1997-01-03 00:26:28 +00:00
Barry Warsaw f3f41a9e57 Added declaration for PyErr_SetInterrupt. 1997-01-03 00:15:03 +00:00
Barry Warsaw 929711765e Several changes:
- Conform to standard Python C coding styles.

- All static symbols were renamed and shorted.

- Eyeballed all return values and memory references.

- Fixed a bug in signal.pause() so that exceptions raised in signal
  handlers are now properly caught after pause() returns.

- Removed SIGCPU and SIGFSZ.  We surmise that these were typos for the
  previously missing SIGXCPU and SIGXFSZ.
1997-01-03 00:14:25 +00:00
Guido van Rossum 420c11c6aa Added f/d tests for specific byte orders. 1997-01-03 00:09:46 +00:00
Guido van Rossum 4ccc531f34 Ok, ok, I've fixed gradual underflow on packing too.
Still don't know what to do with Inf/NaN, so I raise an exception on
pack(), and something random decided by ldexp() will happen on
unpack().
1997-01-02 23:23:20 +00:00
Guido van Rossum 6083f0e9ce Use the new struct module's ability to pack and unpack standardized
data formats.  The _xdr module is no longer used, since struct
supports the required IEEE floats and doubles.

(I have one doubt about not using _xdr.  The struct module doesn't
handle Inf, NaN and gradual underflow correctly.  If the _xdr module
does these things better, it may still have a (small) competitive
advantage.  On the other hand, since not all platforms support IEEE
floating point, it's not clear that it would be a good idea to ever
transfer Inf or NaNs.  Gradual underflow can be fixed in the struct
module.
1997-01-02 22:52:15 +00:00
Guido van Rossum 07ef655222 Oops -- unpack float/double didn't do the right thing if e==0. 1997-01-02 22:31:07 +00:00
Guido van Rossum 74679b455f Support float and double in non-native formats.
These use the ANSI/IEEE standard, which is also used by XDR;
so the _xdr module may become obsolete.
1997-01-02 22:21:36 +00:00
Barry Warsaw 9e3fceb5b3 rotorobj_setkey(): A single string argument is now required (i.e. no
long optional with nearly-no-op missing).
1997-01-02 20:36:36 +00:00