[Python-Dev] Property syntax (Re: [Python-Dev] Extended Function
syntax)
Ben Laurie
ben@algroup.co.uk
Fri, 31 Jan 2003 14:49:33 +0000
Guido van Rossum wrote:
>>Guido:
>>
>>>Actually I was attempting to find a solution not just for properties
>>>but for other situations as well. E.g. someone might want to define
>>>capabilities, or event handlers, or ...
>>
>
> [Greg]
>
>>I'm not sure what a capability is, exactly, so I don't
>>know what would be required to provide one.
>
>
> Me neither. :-) One person tried to convince me to change the
> language to allow 'capclass' and 'capability' as keywords
> (alternatives for 'class' and 'def'). In the end I convinced them
> that 'rexec' is good enough (if the implementation weren't flawed by
> security holes, all of which are theoretically fixable). I *still*
> don't know what a capability is.
I'll admit to being that person. A capability is, in essence, an opaque
bound method. Of course, for them to be much use, you want the system to
provide some other stuff, like not being able to recreate capabilities
(i.e. you get hold of them from on high, and that's the _only_ way to
get them).
If I'd known from the start that rexec restricted access to bound method
attributes, I'd've saved a lot of time and typing, particularly since
I've recognised from early on that rexec is needed to get anywhere at
all :-)
OTOH, its taken me a while to realise that the only other thing you need
are opaque bound methods, so maybe it wouldn't have helped to have know
that about rexec from the start. And maybe more is needed, I won't know
until I get more deeply into it.
Anyway, I'm now interested in fixing rexec. Guido's already told me some
ways in which it is broken. If people know of others, I'll start
gathering them together.
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html http://www.thebunker.net/
"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff