On Wed, 5 Jul 2000, Greg Ward wrote:

> Well, it's a nice theory.  It doesn't explain why '__add__()' works for
> ExtensionClass while '__radd__()' does not; perhaps ExtensionClass
> implements that much of Python's class semantics, but doesn't go as far
> as '__radd__()'.

A quick note which you probably already know:

grep add ExtensionClass.c gives:

static PyObject *py__add__, *py__sub__, *py__mul__, *py__div__,
  INIT_PY_NAME(__add__); BINOP(add,Add)
      FILLENTRY(nm->nb, add, add, METH_VARARGS, "Add to another");
      FILLENTRY(sm->sq, concat, add, METH_VARARGS,
          SET_SPECIAL(add,add); subclass_add(PyObject *self, PyObject *v)
  UNLESS(m=subclass_getspecial(self,py__add__)) return NULL;
          && AsCMethod(m)->meth==(PyCFunction)add_by_name
  (binaryfunc)subclass_add, /*nb_add*/
        (binaryfunc)subclass_add, /*sq_concat*/
      return; /* we added a reference; don't delete now */ 

whereas grep radd ExtensionClass.c returns nothing


Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to