| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
floatobject.c: fix hash().
methodobject.c: support METH_FREENAME flag bit.
|
|
|
|
| |
lookmapping() for empty dictionary
|
|
|
|
| |
can now be NULL.
|
| |
|
|
|
|
| |
was broken.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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?)
|
|
|
|
| |
after it has been freed.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
pow(x,y,z) == pow(x,y)%z, but without incurring overflow
Correct problems found by THINK C 6.0
|
|
|
|
| |
Add cast for Lance
|
| |
|
|
|
|
|
|
| |
env at configure time and will then be put in all Makefiles as
default
* */Makefile*.in: remove lib*.a before adding to it
|
|
|
|
| |
arguments (adding __delattr__ was deemed too much overhead)
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Added Makefile.in.
|
|
|
|
| |
object (unchanged from source except "range" -> "xrange").
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* funcobject.c (func_repr): don't call getstringvalue(None) for anonymous
functions.
* bltinmodule.c: removed lambda (which is now a built-in function);
removed implied lambda for string arg to filter/map/reduce.
* Grammar, graminit.[ch], compile.[ch]: replaced lambda as built-in
function by lambda as grammar entity: instead of "lambda('x: x+1')" you
write "lambda x: x+1".
* Xtmodule.c (checkargdict): return 0, not NULL, for error.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* posixmodule.c: don't prototype getcwd() -- it's not portable...
* mappingobject.c: double-check validity of last_name_char in
dict{lookup,insert,remove}.
* arraymodule.c: need memmove only for non-STDC Suns.
* Makefile: comment out HTML_LIBS and XT_USE by default
* pythonmain.c: don't prototype getopt() -- it's not standardized
* socketmodule.c: cast flags arg to {get,set}sockopt() and addrbuf arg to
recvfrom() to (ANY*).
* pythonrun.c (initsigs): fix prototype, make it static
* intobject.c (LONG_BIT): only #define it if not already defined
* classobject.[ch]: remove all references to unused instance_convert()
* mappingobject.c (getmappingsize): Don't return NULL in int function.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
each dir in sys.path, try each possible extension. (Note: C extensions
are loaded before Python modules in the same directory, to allow having
a C version used when dynamic loading is supported and a Python version
as a back-up.)
* import.c (reload_module): test for error from getmodulename()
* moduleobject.c: implement module name as dict entry '__name__' instead
of special-casing it in module_getattr(); this way a module (or
function!) can access its own module name, and programs that know what
they are doing can rename modules.
* stdwinmodule.c (initstdwin): strip ".py" suffix of argv[0].
|
| |
|
| |
|
|
|
|
|
|
| |
parser.
* mappingobject.c (lookmapping): 'freeslot' was never used due to a bug in
the code.
|
|
|
|
|
|
| |
* {tuple,list,mapping,array}object.c: call printobject with 0 for flags
* compile.c (parsestr): use quote instead of '\'' at one crucial point
* arraymodule.c (array_getattr): Added __members__ attribute
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* object.[ch], bltinmodule.c, fileobject.c: changed str() to call
strobject() which calls an object's __str__ method if it has one.
strobject() is also called by writeobject() when PRINT_RAW is passed.
* ceval.c: rationalize code for PRINT_ITEM (no change in function!)
* funcobject.c, codeobject.c: added compare and hash functionality.
Functions with identical code objects and the same global dictionary are
equal. Code objects are equal when their code, constants list and names
list are identical (i.e. the filename and code name don't count).
(hash doesn't work yet since the constants are in a list and lists can't
be hashed -- suppose this should really be done with a tuple now we have
resizetuple!)
|
|
|
|
| |
(Also hash, but it doesn't work yet.)
|
| |
|
|
|
|
|
|
| |
pythonrun.c: added static forward declarations
* pythonrun.h, ceval.h, longobject.h, node.h: removed declarations of
static routines
|
| |
|
|
|
|
| |
object.
|
|
|
|
|
| |
Added ifdefs in stringobject.c for shared strings of length 1.
Renamed free_list in tupleobject.c to free_tuples.
|
|
|
|
|
|
| |
setlistslice() can be used to cut the unused part out of a freshly made
slice (as done by bagof()). [needed by the next mod!]
* structural changes to bagof(), map() etc.
|
|
|
|
|
|
|
|
|
|
| |
* PROTO.h, mymalloc.h: added #ifdefs for TURBOC and GNUC.
* allobjects.h: added #include "rangeobject.h"
* Grammar: added lambda_input; relaxed syntax for exec.
* bltinmodule.c: added bagof, map, reduce, lambda, xrange.
* tupleobject.[ch]: added resizetuple().
* rangeobject.[ch]: new object type to speed up range operations (not
convinced this is needed!!!)
|
|
|
|
| |
some cases.
|
| |
|
|
|
|
| |
* import.c: fixed core dump when out-of-date .pyc file encountered (again!)
|
|
|
|
|
| |
file.
object.c: Write allocation statistics to stderr.
|
|
|
|
| |
cstubs: Use Matrix type instead of float[4][4].
|
|
|
|
|
|
|
| |
* Grammar: add exec statement; allow testlist in expr statement.
* ceval.c, compile.c, opcode.h: support exec statement;
avoid optimizing locals when it is used
* fileobject.{c,h}: add getfilename() internal function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
shared. The default is to save references to the integers in
the range -1..99. The lower limit can be set by defining
NSMALLNEGINTS (absolute value of smallest integer to be saved)
and NSMALLPOSINTS (1 more than the largest integer to be
saved).
tupleobject.c: Save a reference to the empty tuple to be returned
whenever a tuple of size 0 is requested. Tuples of size 1
upto, but not including, MAXSAVESIZE (default 20) are put in
free lists when deallocated. When MAXSAVESIZE equals 1, only
share references to the empty tuple, when MAXSAVESIZE equals
0, don't include the code at all and revert to the old
behavior.
object.c: Print some more statistics when COUNT_ALLOCS is defined.
|
|
|
|
|
|
|
|
|
|
| |
without .py file); Bill's dynamic loading for SunOS using shared
libraries.
pwdmodule.c (mkgrent): remove DECREF of uninitialized variable.
classobject.c (instance_getattr): Fix case when class lookup returns
unbound method instead of function.
|
|
|
|
|
|
|
|
| |
image objects, and lots of new methods.
* Added counting of allocations and deallocations of builtin types if
COUNT_ALLOCS is defined. Had to move calls to NEWREF down in some
files.
* Bug fix in sorting lists.
|
|
|
|
|
| |
* frameobject.c (newframeobject): initialize ob_type if taking entry
from the free list, since it is zeroed out when DEBUG is defined.
|
| |
|