On Thu, May 1, 2008 at 7:30 PM, Robert Brown <brown@google.com> wrote:
The call to ensure-class without

   :metaclass 'py-core-type

succeeds.

The call with the :metaclass argument fails inside change-class:

 (defmethod change-class ((instance standard-object) (new-class standard-class)
                          &rest initargs)
   (unless (class-finalized-p new-class)
     (finalize-inheritance new-class))
   (let ((cpl (class-precedence-list new-class)))
     (dolist (class cpl)
       (macrolet
           ((frob (class-name)
              `(when (eq class (find-class ',class-name))
                (error 'metaobject-initialization-violation
                 :format-control "~@<Cannot ~S objects into ~S
                 metaobjects.~@:>"
                 :format-arguments (list 'change-class ',class-name)
                 :references (list '(:amop :initialization ,class-name))))))
         (frob class)
         (frob generic-function)
         (frob method)
         (frob slot-definition))))
   (change-class-internal instance new-class initargs))

CLASS is on the class precedence list of PY-CORE-TYPE.

Thanks, I'm going to look into this.

- Willem