* Lots of small changes related to access.

* Added "access *: ...", made access work for class methods.
* Introduced subclass check: make sure that when calling
  ClassName.methodname(instance, ...), the instance is an instance of
  ClassName or of a subclass thereof (this might break some old code!)
This commit is contained in:
Guido van Rossum 1993-05-21 19:56:10 +00:00
parent 81daa32c15
commit b3f7258f14
7 changed files with 112 additions and 49 deletions

View file

@ -105,10 +105,10 @@ meth_repr(m)
{
char buf[200];
if (m->m_self == NULL)
sprintf(buf, "<built-in function '%.80s'>", m->m_name);
sprintf(buf, "<built-in function %.80s>", m->m_name);
else
sprintf(buf,
"<built-in method '%.80s' of %.80s object at %lx>",
"<built-in method %.80s of %.80s object at %lx>",
m->m_name, m->m_self->ob_type->tp_name,
(long)m->m_self);
return newstringobject(buf);