[Python-3000] PEP 3133: Introducing Roles (original) (raw)

Collin Winter collinw at gmail.com
Mon May 14 21:52:22 CEST 2007


On 5/14/07, Arvind Singh <arvind1.singh at gmail.com> wrote:

> Asking Questions About Roles

Shouldn't there be some way to ``revoke'' roles?

No, roles are purely additive. Allowing role revocation is an easy recipe for race conditions where one bit of code says type X does a given role and another bit of code says it doesn't.

How can we get a list of all roles played by an object?

Something like this could be trivially added. What use-case do you have in mind?

Should there be a way to check ``loosely'' whether an object can potentially play a given role? (i.e., checking whether an object provides a give interface, atleast syntactically)

This could be added, yes.

Collin Winter



More information about the Python-3000 mailing list