diff options
author | Guido van Rossum <guido@python.org> | 1993-03-29 10:43:31 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-03-29 10:43:31 (GMT) |
commit | 9bfef44d97d1ae24e03717e3d59024b44626a9de (patch) | |
tree | 736b9f406d27f9dc4496f103cd395fb7a97401d4 /Objects/mappingobject.c | |
parent | 4b1302bd1d211881178618aa8f41fa4460180f2e (diff) | |
download | cpython-9bfef44d97d1ae24e03717e3d59024b44626a9de.zip cpython-9bfef44d97d1ae24e03717e3d59024b44626a9de.tar.gz cpython-9bfef44d97d1ae24e03717e3d59024b44626a9de.tar.bz2 |
* 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
Diffstat (limited to 'Objects/mappingobject.c')
-rw-r--r-- | Objects/mappingobject.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Objects/mappingobject.c b/Objects/mappingobject.c index 1cfa308..fa66a9d 100644 --- a/Objects/mappingobject.c +++ b/Objects/mappingobject.c @@ -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*/ |