[Python-3000] PEP 3133: Introducing Roles
Benji York
benji at benjiyork.com
Wed May 16 19:41:11 CEST 2007
Guido van Rossum wrote:
> On 5/14/07, Benji York <benji at benjiyork.com> wrote:
>> Collin Winter wrote:
>>> PEP: 3133
>>> Title: Introducing Roles
>> Everything included here is included in zope.interface. See in-line
>> comments below for the analogs.
>
> Could you look at PEP 3119 and do a similar analysis?
Sure.
> I expect that
> the main thing missing there is that it (currently) has no way to
> claim that a particular *object* has a certain behavior.
Is "it" in that sentence the ABC PEP or zope.interface?
> PEP 3119 currently also doesn't have a
> verification step -- but this could easily be added as an (optional)
> part of the registration call.
I don't care much for verification. People using zope.interface have
found that writing good tests is superior to on-demand verification, and
I suspect execution time verification is a non-starter because of the
overhead (not to mention its actual desirability, or lack thereof).
> BTW I think Collin made a mistake when he claimed that the Doglike
> role should throw a tantrum just because the actual bark()
> implementation has an optional extra argument
Agreed.
--
Benji York
http://benjiyork.com
More information about the Python-3000
mailing list