diff Objects/moduleobject.c @ 1293:ac3c80abbf43 legacy-trunk

* classobject.c: in instance_getattr, don't make a method out of a function found as instance data. * socketmodule.c: added 'flags' argument sendto/recvfrom, rewrite argument parsing in send/recv. * More changes related to access (terminology change: owner instead of class; allow any object as owner; local/global variables are owned by their dictionary, only class/instance data is owned by the class; "from...import *" now only imports objects with public access; etc.)
author Guido van Rossum <guido@python.org>
date Tue, 25 May 1993 09:38:27 +0000
parents 4d292c7857d4
children 315272ec4d5b
line wrap: on
line diff
--- a/Objects/moduleobject.c	Mon May 24 14:19:37 1993 +0000
+++ b/Objects/moduleobject.c	Tue May 25 09:38:27 1993 +0000
@@ -112,7 +112,7 @@
 		err_setstr(AttributeError, name);
 	else {
 		if (is_accessobject(res))
-			res = getaccessvalue(res, getclass());
+			res = getaccessvalue(res, getglobals());
 		else
 			INCREF(res);
 	}
@@ -135,7 +135,7 @@
 	}
 	ac = dictlookup(m->md_dict, name);
 	if (ac != NULL && is_accessobject(ac))
-		return setaccessvalue(ac, getclass(), v);
+		return setaccessvalue(ac, getglobals(), v);
 	if (v == NULL) {
 		int rv = dictremove(m->md_dict, name);
 		if (rv < 0)