Code block literals
Alex Martelli
aleax at aleax.it
Fri Oct 10 13:40:51 EDT 2003
Andrew Dalke wrote:
...[quoting me indirectly]...
>> > If Python's syntax defined
>> > other forms of suites, e.g. hypothetically:
>> >
>> > with <object>:
>> > <suite>
>> >
>> > meaning to call the object (or some given method[s] in it, whatever)
>> > with the suite as its argument, it would be just as explicit as, e.g.:
>> >
>> > for <name> in <object>:
>> > <suite>
>
> A reasonable point. However, inside the 'with' statement it's hard
> to know if
>
> print x
Sorry, I was NOT using 'with' in a Pascal/Basic sense, but rather
to mean, and I quote: "meaning to call ... with the suite" (others
have proposed 'using' etc for this construct in python-dev). I
was using 'with' only because so many macros quoted on the xposted
thread appear to start with "WITH-..." ...!-)
Alex
More information about the Python-list
mailing list