[Python-3000] bytes & Py_TPFLAGS_BASETYPE (original) (raw)
Guido van Rossum guido at python.org
Mon Sep 17 16:55:43 CEST 2007
- Previous message: [Python-3000] bytes & Py_TPFLAGS_BASETYPE
- Next message: [Python-3000] bytes & Py_TPFLAGS_BASETYPE
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 9/16/07, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
Guido van Rossum wrote: > It is possible to compromise the integrity of a built-in type by > subclassing it if the type wasn't carefully written to expect > subclassing.
Disallowing subclassing in Python may make sense, but it seems unreasonable not to allow subclassing by consenting C code that is careful not to compromise any integrity. Maybe there should be two flags for this instead of just one?
AFAIK there's nothing stopping you from subclassing in C. I thought we were talking about Python though.
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-3000] bytes & Py_TPFLAGS_BASETYPE
- Next message: [Python-3000] bytes & Py_TPFLAGS_BASETYPE
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]