function problem

Chris Rebert clp2 at rebertia.com
Mon Jan 9 22:44:31 EST 2012


On Mon, Jan 9, 2012 at 7:35 PM, contro opinion <contropinion at gmail.com> wrote:
> code1:
>
> def FirstDeco(func):
>    print 'haha'
>    y=func()
>    return y
>    print  y

Since there's a `return` right before it, the latter `print` here will
*never* be executed.

Cheers,
Chris



More information about the Python-list mailing list