ANN: Dao Language v.0.9.6-beta is release!
Antoon Pardon
apardon at forel.vub.ac.be
Wed Dec 7 04:43:09 EST 2005
Op 2005-12-07, Christophe schreef <chris.cavalaria at free.fr>:
> Paul Rubin a écrit :
>> Antoon Pardon <apardon at forel.vub.ac.be> writes:
>>
>>>But lately I have been wondering about doing the following:
>>>end = None
>>>...
>>> if ...:
>>> ...
>>> end
>>>IMO it looks better, but I'm reluctant because it suggest
>>>some checking by the compilor, which just doesn't happen.
>>
>>
>> I don't think you can always do that.
>>
>> try:
>> ...
>> end
>> except blah:
>> ...
>>
>> looks syntactically invalid.
>
> You shouldn't put "end" before the except but after :
>
> try:
> ...
> except blah:
> ...
> end
What I was wondering about. Some year back or longer someone
suggested a module he had written could help those who like
end markers.
He had written a function 'end' you could use as follows and
that would check if it ended the right block.
if ...:
...
end('if')
Can anyone recall? I have tried google to find it back, but
no luck. A pointer would be much appreciated.
--
Antoon Pardon
More information about the Python-list
mailing list