| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Also got rid of some unnecessary code.
|
|
|
|
|
|
|
|
|
| |
__getitem__(). This method never raises an exception; if the key is
not in the dictionary, the second (optional) argument is returned. If
the second argument is not provided and the key is missing, None is
returned.
mapp_methods: added "get" method.
|
| |
|
|
|
|
| |
improvement of pystone. Vladimir Marangozov.
|
|
|
|
| |
ones near the front.
|
| |
|
| |
|
|
|
|
|
| |
few places where we don't know how to test for them without losing
speed; don't know yet how to handle that.
|
|
|
|
| |
Fixed two 'return NULL' that should be 'return -1'.
|
|
|
|
|
|
|
| |
complexity saved much any more. A simple benchmark (grail) showed
that there were 3 times as many misses as hits, and the same number of
times again the code was bypassed altogether due to the existence of
setattro/getattro.
|
|
|
|
| |
(Sorry Jack, all your projects will have to be changed again. :-( )
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- remove bogus initialization using uninitialized i
- derive initial incr from hash
- copy mp->ma_table into a local variable
|
|
|
|
| |
Reindented the whole table.
|
|
|
|
|
|
|
|
|
| |
The table size is now constrained to be a power of two, and we use a
variable increment based on GF(2^n)-{0} (not that I have the faintest
idea what that is :-) which helps avoid the expensive '%' operation.
Some of the entries in the table of polynomials have been modified
according to a post by Tim Peters.
|
|
|
|
|
| |
string keys. Just doing a pointer compare before the string compare
(in fact before the hash compare!) is just as fast.
|
| |
|
| |
|
|
|
|
|
|
|
| |
defines that a shorter dictionary is always smaller than a longer one.
For dictionaries of the same size, the smallest differing element
determines the outcome (which yields the same results as before,
without explicit sorting).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
floatobject.c: fix hash().
methodobject.c: support METH_FREENAME flag bit.
|
|
|
|
| |
lookmapping() for empty dictionary
|
|
|
|
| |
can now be NULL.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
cstubs: Use Matrix type instead of float[4][4].
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(1) dictionaries/mappings now have attributes values() and items() as
well as keys(); at the C level, use the new function mappinggetnext()
to iterate over a dictionary.
(2) "class C(): ..." is now illegal; you must write "class C: ...".
(3) Class objects now know their own name (finally!); and minor
improvements to the way how classes, functions and methods are
represented as strings.
(4) Added an "access" statement and semantics. (This is still
experimental -- as long as you don't use the keyword 'access' nothing
should be changed.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Stubs for faster implementation of local variables (not yet finished)
* Added function name to code object. Print it for code and function
objects. THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version
number has changed accordingly)
* Print address of self for built-in methods
* New internal functions getattro and setattro (getattr/setattr with
string object arg)
* Replaced "dictobject" with more powerful "mappingobject"
* New per-type functio tp_hash to implement arbitrary object hashing,
and hashobject() to interface to it
* Added built-in functions hash(v) and hasattr(v, 'name')
* classobject: made some functions static that accidentally weren't;
added __hash__ special instance method to implement hash()
* Added proper comparison for built-in methods and functions
|
|
|