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


Groups > comp.lang.python > #18729 > unrolled thread

Re: function problem

Started byChris Rebert <clp2@rebertia.com>
First post2012-01-09 19:44 -0800
Last post2012-01-09 19:44 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: function problem Chris Rebert <clp2@rebertia.com> - 2012-01-09 19:44 -0800

#18729 — Re: function problem

FromChris Rebert <clp2@rebertia.com>
Date2012-01-09 19:44 -0800
SubjectRe: function problem
Message-ID<mailman.4573.1326167074.27778.python-list@python.org>
On Mon, Jan 9, 2012 at 7:35 PM, contro opinion <contropinion@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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web