@decorators

Hallvard B Furuseth h.b.furuseth at usit.uio.no
Sun Aug 8 00:27:54 EDT 2004


Neil Hodgson wrote:
>daishi:
> 
>> As far as I know, the proposed @decorator syntax will be the first
>> time that two logical lines of python with the same indentation will
>> not be independent of one another. Previously, when looking at:
>>
>> some_python(code)
>> and_some_more = stuff
>>
>> there was no need to look at the the first line in order to know what
>> the second line meant/did (and vice versa).
> 
>    Much of the time, consecutive lines with the same indentation are highly
> dependent with earlier lines modifying the behaviour of successor lines:
> 
>    global x
>    x = 9

Poor example.  They are visually tied together in that they both mention
the variable x.  '@decorator's do not mention the function they affect.

-- 
Hallvard



More information about the Python-list mailing list