functions without parentheses
phil hunt
zen19725 at zen.co.uk
Sat Jul 30 03:14:16 EDT 2005
On Fri, 29 Jul 2005 06:37:52 GMT, Bengt Richter <bokr at oz.net> wrote:
>
>I suggested in a previous thread that one could support such a syntax by
>supporting an invisible binary operator between two expressions,
That's a truely appalling idea.
>so that
>examine "string" translates to examine.__invisbinop__("string") if
>examine as an expression evaluates to an object that has a __invisbinop__ method.
>
>Then you wouldn't define examine as a function, you would define it as an instance
>of a class like
> class Examine(object):
> define __invisbinop__(self, other):
> #...whatever
> examine = Examine()
>and then
> examine "string"
Pass the sick bucket.
--
Email: zen19725 at zen dot co dot uk
More information about the Python-list
mailing list