syntax for code blocks
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Fri Apr 27 10:09:30 EDT 2012
On Fri, 27 Apr 2012 13:24:35 +0200, Kiuhnm wrote:
> I'd like to change the syntax of my module 'codeblocks' to make it more
> pythonic.
>
> Current Syntax:
>
> with res << func(arg1) << 'x, y':
> print(x, y)
>
> with res << func(arg1) << block_name << 'x, y':
> print(x, y)
I'm sorry, I don't see how this is a code block. Where is the code in the
block, and how can you pass it to another object to execute it?
--
Steven
More information about the Python-list
mailing list