mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
* Changed all copyright messages to include 1993.
* 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
This commit is contained in:
parent
4b1302bd1d
commit
9bfef44d97
97 changed files with 559 additions and 246 deletions
|
@ -24,8 +24,13 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
/* Mapping object implementation; using a hash table */
|
||||
|
||||
/* This file should really be called "dictobject.c", since "mapping"
|
||||
is the generic name for objects with an unorderred arbitrary key
|
||||
set (just like lists are sequences), but since it improves (and was
|
||||
originally derived from) a file by that name I had to change its
|
||||
name. For the user these objects are still called "dictionaries". */
|
||||
|
||||
#include "allobjects.h"
|
||||
#include "mappingobject.h"
|
||||
#include "modsupport.h"
|
||||
|
||||
|
||||
|
@ -593,7 +598,7 @@ mapping_getattr(mp, name)
|
|||
typeobject Mappingtype = {
|
||||
OB_HEAD_INIT(&Typetype)
|
||||
0,
|
||||
"mapping",
|
||||
"dictionary",
|
||||
sizeof(mappingobject),
|
||||
0,
|
||||
mapping_dealloc, /*tp_dealloc*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue