Greg Ewing <[EMAIL PROTECTED]> writes on Wed, 28 Jun 2006 11:56:55 +1200:
>...
> I have suggested that builtin functions should be
> given the same method-binding behaviour as interpreted
> functions. The idea wasn't rejected out of hand, but
> I don't think anything has been done about it yet.

You can use:

        def wrapAsMethod(to_be_wrapped)
          def wrapped(*args, **kw):
            return to_be_wrapper(*args, **kw)
          return wrapped

and then use in your class:

        class ...:
          ...
          myMethod = wrapAsMethod(builtin_function)


Such, this use case probably does not require a language change.


Dieter
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to