Pythonic way for missing dict keys

Alex Popescu nospam.themindstorm at gmail.com
Thu Aug 2 18:20:46 EDT 2007


aleax at mac.com (Alex Martelli) wrote in news:1i27mku.1sc8l3x1dda3crN%
aleax at mac.com:

> Bruno Desthuilliers <bruno.42.desthuilliers at wtf.websiteburo.oops.com>
> wrote:
> 
>> Alex Popescu a écrit :
>
> [... snip ...]
>
> 
> The mere check of whether an object possesses some important special
> method is best accomplished through the abstract-base-classes machinery
> (new in Python 3.0: see <http://www.python.org/dev/peps/pep-3119/>).  At
> this time there is no Callable ABC, but you're welcome to argue for it
> on the python-3000 mailing list (please do check the archives and/or
> check privately with the PEP owner first to avoid duplication).
>

This PEP sounds very similar to Java interfaces (well, as an enhanced 
version as you are allowed to programmatically control this inheritance 
chain). Interesting approach. And now I can agree that the removal of 
callable() makes sense!

Thanks a lot for the pointer Alex.

./alex
--
.w( the_mindstorm )p.

> 
> Alex
>  





More information about the Python-list mailing list