Barry Warsaw
cde8b1ba0c
Two new built-in functions: issubclass() and isinstance(). Both take
...
classes as their second arguments. The former takes a class as the
first argument and returns true iff first is second, or is a subclass
of second.
The latter takes any object as the first argument and returns true iff
first is an instance of the second, or any subclass of second.
Also, change all occurances of pointer compares against
PyExc_IndexError with PyErr_ExceptionMatches() calls.
1997-08-22 21:14:38 +00:00
Guido van Rossum
25ce566661
The last of the mass checkins for separate (sub)interpreters.
...
Everything should now work again.
See the comments for the .h files mass checkin (e.g. pystate.h) for
more detail.
1997-08-02 03:10:38 +00:00
Guido van Rossum
c8b6df9004
PyObject_Compare can raise an exception now.
1997-05-23 00:06:51 +00:00
Guido van Rossum
b6a7f77c9f
Oops -- missed FloatingPointError in renaming.
1997-05-09 03:03:23 +00:00
Guido van Rossum
b05a5c7698
Instead of importing graminit.h whenever one of the three grammar 'root'
...
symbols is needed, define these in Python.h with a Py_ prefix.
1997-05-07 17:46:13 +00:00
Guido van Rossum
666b17a280
New dir() function --
...
- uses abstract interface where possible
- uses __members__ and __methods__
- returns [] when an object has no info available
1997-05-06 16:36:57 +00:00
Guido van Rossum
15e33a4c42
Avoid sprintf buffer overflow if more than 9999 arguments.
1997-04-30 19:00:27 +00:00
Guido van Rossum
79f25d9a7b
Quickly renamed the remaining files -- this directory is done.
1997-04-29 20:08:16 +00:00
Guido van Rossum
6bf62dad9e
Keep gcc -Wall and Microsoft VC happy.
1997-04-11 20:37:35 +00:00
Guido van Rossum
c6472e9ee1
1. Add string conversions to int(), long(), float(). (Not to complex()!)
...
2. Fix two bugs in complex():
- Memory leak when using complex(classinstance) -- r was never
DECREF'ed.
- Conversion of the second argument, if not complex, was done using
the type vector of the 1st.
1997-03-31 17:15:43 +00:00
Guido van Rossum
1c6a459921
Define __debug__ as 0 if -O is given, 1 otherwise. Also test for
...
errors in initializing the dictionary.
1997-03-11 18:43:26 +00:00
Guido van Rossum
0ae748d3c4
Changes for Lee Busby's SIGFPE patch set.
...
New file pyfpe.c and exception FloatingPointError.
Surround some f.p. operations with PyFPE macro brackets.
1997-02-14 22:58:07 +00:00
Guido van Rossum
e8811f85ed
Added intern() function.
1997-02-14 15:48:05 +00:00
Guido van Rossum
8d75161671
Intern the string "__complex__".
1997-01-18 08:04:16 +00:00
Guido van Rossum
1a2c5cbcc4
Add unistd.h to make gcc -Wall happy.
1996-12-10 15:37:36 +00:00
Guido van Rossum
ed0af8fe70
Support __complex__ method on instances, for complex() conversion.
...
Keep gcc -Wall happy.
1996-12-05 23:18:18 +00:00
Guido van Rossum
d266eb460e
New permission notice, includes CNRI.
1996-10-25 14:44:06 +00:00
Guido van Rossum
b75fba04c7
Forget about Ellipses b/w compatibility.
1996-10-16 04:18:36 +00:00
Guido van Rossum
e449af7da9
Ellipses -> Ellipsis rename (the dictionary really says that it should
...
be Ellipsis!).
Bumped the API version because a linker-visible symbol is affected.
Old C code will still compile -- there's a b/w compat macro.
Similarly, old Python code will still run, builtin exports both
Ellipses and Ellipsis.
1996-10-11 16:25:41 +00:00
Guido van Rossum
b072150d7f
Stupid bug: complex(x,y) would yield x+xj
1996-09-07 15:55:27 +00:00
Guido van Rossum
79d96d6bff
Don't die in resizestring() on filter(<func>, "").
1996-08-16 20:44:34 +00:00
Guido van Rossum
fe4b6ee775
Include mymath.h instead of declaring prototypes for math functions.
...
Fix leak and unchecked error in complex().
1996-08-08 18:49:41 +00:00
Guido van Rossum
6ffd553899
Add 'Ellipses' object.
1996-07-30 18:37:55 +00:00
Guido van Rossum
8861b74445
Changes for slice and ellipses
1996-07-30 16:49:37 +00:00
Guido van Rossum
530956d247
Py_complex; and WITHOUT_COMPLEX added to getargs.c
1996-07-21 02:27:43 +00:00