[Python-Dev] innocent question ;-) (original) (raw)
Thomas Heller thomas.heller@ion-tof.com
Fri, 26 Oct 2001 15:57:23 +0200
- Previous message: [Python-Dev] innocent question ;-)
- Next message: [Python-Dev] innocent question ;-)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: "Guido van Rossum" <guido@python.org>
> ... about my beloved buffer object: > > Would a patch to make the buffer object subclassable > be still accepted for 2.2, or does this fall under > the feature freeze?
NO. Go away. :-) Ok. ;-( Is the list of subtypable types now complete (for 2.2), or do you indend to do more?
I think the buffer() builtin should be deprecated, not improved. > Another question: > It is my understanding that makeing an object > subclassable also exposes its constructor to Python. Yes, since otherwise there would be no way to instantiate the subclass either. So I understood this... > What is the signature of this constructor? Is the > three argument version xxx(name, bases, dict) always used > to return a new type object (Don Beaudry hook), and can other > signatures freely be used to creates objects/instances > of this type/class? I'm sorry, I don't understand the question. This is the constructor signature for type object, IOW for metaclasses. It has nothing to do with the constructor signature for builtin classes. ...but not this, sorry. I've confused this:
int(10) 10
with this:
type(int)("name", (), {}) <class '__main__.name'>
Sorry again.
Thomas
- Previous message: [Python-Dev] innocent question ;-)
- Next message: [Python-Dev] innocent question ;-)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]