[Python-Dev] Re: anonymous blocks

Guido van Rossum gvanrossum at gmail.com
Wed Apr 27 23:59:42 CEST 2005


[Jim Fulton]

> 2. I assume it would be a hack to try to use block statements to implement
>     something like interfaces or classes, because doing so would require
>     significant local-variable manipulation.  I'm guessing that
>     either implementing interfaces (or implementing a class statement
>     in which the class was created before execution of a suite)
>     is not a use case for this PEP.

I would like to get back to the discussion about interfaces and
signature type declarations at some point, and a syntax dedicated to
declaring interfaces is high on my wish list.

In the mean time, if you need interfaces today, I think using
metaclasses would be easier than using a block-statement (if it were
even possible using the latter without passing locals() to the
generator).

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list