Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68576

Re: Decorator

From Peter Otten <__peter__@web.de>
Subject Re: Decorator
Date 2014-03-20 14:04 +0100
Organization None
References <CACk27ULPKOaYzU404yanq7e=4qZMhBgk24LwmVZJ=gZz51wQJQ@mail.gmail.com> <lgee5r$ffp$1@ger.gmane.org> <lgehfh$nfh$1@ger.gmane.org>
Newsgroups comp.lang.python
Message-ID <mailman.8299.1395320689.18130.python-list@python.org> (permalink)

Show all headers | View raw


Dave Angel wrote:

>  Peter Otten <__peter__@web.de> Wrote in message:
> 
>> 
>> In your code change
>> 
>> fib1 = isOddMy(fib)
>> 
>> to
>> 
>> fib = isOddMy(fib)
>> 
>> and the without@ version will produce the same output as the with@
>> version.
>> 
>> 
> 
> I expect that one more thing is needed,  since the above is inside
>  a function:
> 
>      global fib
>      fib = isOdd (fib)

Yes, sorry, I missed that. 

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Decorator Peter Otten <__peter__@web.de> - 2014-03-20 14:04 +0100

csiph-web