> I was, however, under the impression that there are subtle
> differences: I don't know how easy it is to create something
> "subclassed" from a type object - our equivalent would (currently)
> be copying the struct and then putting your own function pointers in
> there.

In 2.2, you can do this.  Our type object has lots of ideosyncracies,
so the copying is actually a bit delicate and must be done by a set of
routines, but in a new design it could be straightforward.

> The other subtle difference, now that I think about it, is a bug in Parrot; I
> wasn't planning to garbage collect vtables the same way that we GC PMCs. But
> if we're allowing people to muck about with them and copy them and create
> their own, we're going to need to.

Yes, when I added subclassable types in 2.2, we had to make then
GC'able too. :-)

--Guido van Rossum (home page: http://www.python.org/~guido/)

Reply via email to