A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-April/052916.html below:

[Python-Dev] defmacro (was: Anonymous blocks)

[Python-Dev] defmacro (was: Anonymous blocks)Aahz aahz at pythoncraft.com
Mon Apr 25 20:49:34 CEST 2005
On Mon, Apr 25, 2005, Shane Holloway (IEEE) wrote:
>
> Interfaces::
> 
>     def interface(interfaceName, *bases, ***aBlockSuite):
>         blockGlobals = aBlockSuite.globals().copy()
>         blockGlobals.update(aBlockSuite.locals())
>         blockLocals = {}
> 
>         exec aBlock in blockGlobals, blockLocals
> 
>         return iterfaceType(interfaceName, bases, blockLocals)
> 
>     IFoo = interface('IFoo'):
>         def isFoo(self): pass

Where does ``aBlock`` come from?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"It's 106 miles to Chicago.  We have a full tank of gas, a half-pack of
cigarettes, it's dark, and we're wearing sunglasses."  "Hit it."
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4