ANN: Dao Language v.0.9.6-beta is release!

Antoon Pardon apardon at forel.vub.ac.be
Wed Dec 7 04:05:48 EST 2005


Op 2005-12-07, Paul Rubin schreef <http>:
> 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:
>        ...

IMO this is the wrong way to use end.

end should be used to mark the end of a compound statement,
not the end of a suite. If a suite ending is already clear
because the next clause of the compound statement is beginning,
we don't need an extra marker to make that clear.

So the above should be:

  try:
    ...
  except blah:
    ...
  end

-- 
Antoon Pardon



More information about the Python-list mailing list