Guido van Rossum
295d171650
explicitly init flags in methodlists
1995-02-19 15:55:19 +00:00
Guido van Rossum
67ca701939
NeXT/Sparc 3.3 fix
1995-02-13 16:38:41 +00:00
Guido van Rossum
9fa2c11613
use Py_CHARMASK; and don't check for neg. float to the float power here
1995-02-10 17:00:37 +00:00
Guido van Rossum
2497eada60
make size arg signed
1995-02-10 17:00:27 +00:00
Guido van Rossum
a46d51d9a4
round up list item counts to improve realloc performance
1995-01-26 22:59:43 +00:00
Guido van Rossum
6978503235
added findmethodinchain and methodchain data types
1995-01-26 22:58:48 +00:00
Guido van Rossum
e95d92b65e
removed unused vars
1995-01-26 00:39:21 +00:00
Guido van Rossum
27e916fd35
apply dictclear to dict of deleted modules
1995-01-26 00:39:00 +00:00
Guido van Rossum
49b11fed70
move callable() here
1995-01-26 00:38:22 +00:00
Guido van Rossum
e9c6bcd813
fix leak in func_dealloc (forgot to decref name)
1995-01-20 16:58:19 +00:00
Jack Jansen
7874d1fe7e
Fix NULL dereference in case of out-of-memory condition
1995-01-19 12:09:27 +00:00
Guido van Rossum
32b582b953
fix strobject() behavior
1995-01-17 16:35:13 +00:00
Guido van Rossum
b0fe3a9312
added reverselist; free recycling bin on error exit
1995-01-17 16:34:45 +00:00
Guido van Rossum
3535f6e0a1
long_scan is no longer used
1995-01-17 16:34:13 +00:00
Guido van Rossum
ce00509702
make a few things static
1995-01-17 16:33:39 +00:00
Guido van Rossum
4d3468deab
don't declare fmod/pow for any STDC compiler
1995-01-17 16:33:14 +00:00
Guido van Rossum
b4e7e25fe6
different init for __builtins__
1995-01-17 16:27:25 +00:00
Guido van Rossum
087579ea51
added $& to $(LIB) target for Sequent
1995-01-17 16:11:29 +00:00
Guido van Rossum
ae7bf1a5e7
fix reentrancy bug in slice assignment
1995-01-17 10:21:11 +00:00
Guido van Rossum
20566845c6
properly implement cmp() for class instances
1995-01-12 11:26:10 +00:00
Guido van Rossum
5524a59b09
move coerce() from bltinmodule.c to object.c and implement builtin_coerce() differently
1995-01-10 15:26:20 +00:00
Guido van Rossum
879c581826
implement coercions involving instances properly
1995-01-10 15:24:06 +00:00
Guido van Rossum
c206c766dd
fix memory leak and null pointer dereference
1995-01-10 15:23:19 +00:00
Guido van Rossum
10393b1708
add restrictions in restricted mode
1995-01-10 10:39:49 +00:00
Guido van Rossum
c113482871
add builtins handling and restricted flag
1995-01-10 10:39:16 +00:00
Guido van Rossum
e7d444f785
* Objects/classobject.c: added 5th (function) parameter to
...
instancebinop, to support things like Rational * float; added
documentation strings to classes and methods
1995-01-07 12:35:18 +00:00
Guido van Rossum
cab650db8e
* Objects/methodobject.c: changed drastically, the object now
...
contains a pointer to the struct methodlist (which must be
static); added attributes __name__, __doc__ and __self__
1995-01-07 12:34:58 +00:00
Guido van Rossum
5bd3805ae9
Added __doc__ attribute (alias func_doc), initialized from first
...
constant in code object if it is a string, else None
1995-01-07 12:01:30 +00:00
Guido van Rossum
8b14b4c733
initialize __doc__ to None
1995-01-07 11:59:29 +00:00
Guido van Rossum
29ca26eebf
added getattr(), supporting __doc__ and _name__
1995-01-07 11:58:15 +00:00
Guido van Rossum
016564ab51
attribute-less object is AttributeError, not TypeError
1995-01-07 11:54:44 +00:00
Guido van Rossum
6610ad9d6b
Added 1995 to copyright message.
...
floatobject.c: fix hash().
methodobject.c: support METH_FREENAME flag bit.
1995-01-04 19:07:38 +00:00
Guido van Rossum
efc8713428
* Objects/mappingobject.c (mappingremove): don't call
...
lookmapping() for empty dictionary
1995-01-02 19:42:39 +00:00
Guido van Rossum
d7047b395e
Lots of minor changes. Note for mappingobject.c: the hash table pointer
...
can now be NULL.
1995-01-02 19:07:15 +00:00
Guido van Rossum
bb3c5f7406
fix comparison of instances without _-cmp__
1994-11-10 22:31:02 +00:00
Sjoerd Mullender
b9a6d12498
Comparison of two class instances without __cmp__ or __rcmp__ methods
...
was broken.
1994-10-19 15:11:52 +00:00
Guido van Rossum
03093a248d
* Include/classobject.h, Objects/classobject.c, Python/ceval.c:
...
entirely redone operator overloading. The rules for class
instances are now much more relaxed than for other built-in types
(whose coerce must still return two objects of the same type)
* Objects/floatobject.c: add overflow check when converting float
to int and implement truncation towards zero using ceil/float
* Objects/longobject.c: change ValueError to OverflowError when
converting to int
* Objects/rangeobject.c: modernized
* Objects/stringobject.c: use HAVE_LIMITS instead of __STDC__
* Objects/xxobject.c: changed to use new style (not finished?)
1994-09-28 15:51:32 +00:00
Guido van Rossum
9776adf565
rearranged code in debugging version of DELREF to avoid touching data
...
after it has been freed.
1994-09-07 14:36:45 +00:00
Guido van Rossum
52ca98a390
Yet another version (by me) of __getattr__ etc.
1994-09-05 07:32:29 +00:00
Guido van Rossum
e773754ae5
Mods (really diffs to 2.29) by Michael Scharf for alternative __getattr__ etc.
1994-09-05 07:31:41 +00:00
Guido van Rossum
1d5735e846
Merge back to main trunk
1994-08-30 08:27:36 +00:00
Guido van Rossum
013142a95f
fix nasty bug in resizing (formatstring)
1994-08-30 08:19:36 +00:00
Guido van Rossum
bf8c0e336f
mods by Andrew Kuchling to implement
...
pow(x,y,z) == pow(x,y)%z, but without incurring overflow
Correct problems found by THINK C 6.0
1994-08-29 12:48:32 +00:00
Guido van Rossum
eb1fafcec1
New patches by Andrew to fix various problems
...
Add cast for Lance
1994-08-29 12:47:19 +00:00
Guido van Rossum
6cd2fe043b
Correct problems found by THINK C 6.0
1994-08-29 12:45:32 +00:00
Guido van Rossum
f0171a1626
* configure.in, */Makefile*.in: OPT can now be specified in the
...
env at configure time and will then be put in all Makefiles as
default
* */Makefile*.in: remove lib*.a before adding to it
1994-08-23 14:06:18 +00:00
Guido van Rossum
91ab4a8353
If an attribute is deleted, __setattr__ is called with 2 instead of 3
...
arguments (adding __delattr__ was deemed too much overhead)
1994-08-16 22:13:47 +00:00
Guido van Rossum
0b7d02a36f
New patches by Andrew to fix various problems
1994-08-12 12:52:35 +00:00
Guido van Rossum
e149fa2a1e
* Objects/classobject.c, Include/classobject.h: added __getattr__
...
and __setattr__ support to override getattr(x, name) and
setattr(x, name, value) for class instances. This uses a special
hack whereby the class is supposed to be static: the __getattr__
and __setattr__ methods are looked up only once and saved in the
instance structure for speed
1994-08-12 12:49:46 +00:00
Guido van Rossum
b6775db241
Merge alpha100 branch back to main trunk
1994-08-01 11:34:53 +00:00