[Python-Dev] Built-in functions as methods (original) (raw)

Phillip J. Eby pje@telecommunity.com
Fri, 18 Apr 2003 15:02:14 -0400


Hi guys. Greg, you were asking about making built-in functions act like methods. This could break code, if it applies to all built-in functions. In more than one Python version, I have stuck a built-in type or function into a class, under the assumption that it would behave as a 'staticmethod' now does. If all built-in functions start acting like unbound methods, existing code will break.

I'm not positive, but I think there's even code like this in the standard library.

I'm all for anything that makes Pyrex easier for Greg to maintain , but perhaps there is a flag that could be used to request the behavior so that existing code won't break?