diff Objects/mappingobject.c @ 1257:1cabc2b6c970 legacy-trunk

* 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
author Guido van Rossum <guido@python.org>
date Mon, 29 Mar 1993 10:43:31 +0000
parents 7aa9613ffd36
children 9fed5726a36d
line wrap: on
line diff
--- a/Objects/mappingobject.c	Sat Mar 27 18:11:32 1993 +0000
+++ b/Objects/mappingobject.c	Mon Mar 29 10:43:31 1993 +0000
@@ -24,8 +24,13 @@
 
 /* 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 @@
 typeobject Mappingtype = {
 	OB_HEAD_INIT(&Typetype)
 	0,
-	"mapping",
+	"dictionary",
 	sizeof(mappingobject),
 	0,
 	mapping_dealloc,	/*tp_dealloc*/