"holger krekel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Armin, > > [Armin Rigo Fri, Jun 25, 2004 at 05:18:18PM +0100] > > Moreover, we have a different compatibility problem too: in CPython, built-in > > functions don't have a __get__, so you can put them in classes and read them > > out without having the first argument bound to the instance. For example, if > > you put 'operator.add' in the class TrivialObjSpace, then 'space.add' is > > exactly 'operator.add' and not a bound version of it. > > > > What should we do about it? Maybe asking python-dev for guidance? > > We could ask who is relying on this behaviour that builtin functions don't > get bound on classes. Or maybe just ask who even *knows* it let alone relies > on it :-)
>From this user's viewpoint, the fact that CPython's built-in functions do not quite act the same as functions defined in Python itself (and hence need a separate type ) is a bit of a optimization glitch. Breaking the Python function model does occasionally bite people, leading to puzzled queries on c.l.p (Why doesn't this work (with a builtin) when that did (with a true func)? ... Because builtins are not the same...). So I see the possibility of uniform behavior as an advantage. You might look as what Jython does with its builtins (I have no idea). Terry J. Reedy _______________________________________________ [EMAIL PROTECTED] http://codespeak.net/mailman/listinfo/pypy-dev
