[Python-3000] Traits/roles instead of ABCs

Brett Cannon brett at python.org
Tue May 1 00:31:20 CEST 2007


On 4/30/07, BJörn Lindqvist <bjourne at gmail.com> wrote:
[SNIP]
> One really wise person wrote a long while ago (I'm paraphrasing) that
> each new feature should have to prove itself against the standard
> library. That is, a diff should be produced proving that real world
> Python code reads better with the proposed feature than without. If no
> such diff can be created, the feature probably isn't that useful.

I think it would be a little difficult in this situation as since a
similar mechanism does not currently exist in the stdlib and so most
code is not written so that ABCs or roles are needed.  Plus you have
to find places of both LBYL and EAFP idioms if you did go with this.
I guess you could look for files that use isinstance or catch
AttributeError, respectively, but still.

And thanks for calling Raymond "really wise"; gave me a chuckle (not
because Raymond isn't smart but because he is not some old-timer who
tells "back in the day" stories and thus doesn't fit the stereotypical
"wise man" look).

-Brett


More information about the Python-3000 mailing list