Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'newbie': 0.05; 'interpreter.': 0.07; 'subject:code': 0.07; 'subject:help': 0.08; 'falls': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; '(without': 0.16; 'guarded': 0.16; 'loops': 0.16; 'message- id:@post.gmane.org': 0.16; 'received:80.91.229.3': 0.16; 'received:mediaways.net': 0.16; 'received:plane.gmane.org': 0.16; 'received:pool.mediaways.net': 0.16; 'subject:skip:u 10': 0.16; 'subject:python': 0.16; 'print': 0.22; 'header:User-Agent:1': 0.23; 'resumes': 0.24; 'asking': 0.27; 'header:X-Complaints-To:1': 0.27; 'function': 0.29; 'rest': 0.29; 'statement': 0.30; 'subject:please': 0.30; 'code': 0.31; 'continues': 0.31; 'implied': 0.31; 'prints': 0.31; 'writes:': 0.31; 'there.': 0.32; 'says': 0.33; 'subject:the': 0.34; 'there': 0.35; 'i.e.': 0.36; 'charset:us-ascii': 0.36; 'thanks': 0.36; 'to:addr:python-list': 0.38; 'list,': 0.38; 'explain': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'subject:Can': 0.60; 'simply': 0.61; 'back': 0.62; 'more': 0.64; 'reply': 0.66; 'subjectcharset:utf-8': 0.72; 'end.': 0.84; 'off,': 0.84; 'subject:\t': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Wolfgang Maier Subject: Re: Can anyone please help me in understanding the following =?utf-8?b?cHl0aG9uCWNvZGU=?= Date: Thu, 30 May 2013 10:43:52 +0000 (UTC) References: <921173f3-21e7-46b4-a7b1-86660a3ebc72@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 95.115.57.213 (Mozilla/5.0 (Windows NT 6.2; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369910653 news.xs4all.nl 15932 [2001:888:2000:d::a6]:49602 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46451 gmail.com> writes: > > Thanks for the reply Chris. > > I am newbie to python, so please excuse me if I am asking chilly questions. > > Can you please explain more about the following sentence. > "When it says "Splitting" with a single-element list, it then > immediately prints "Merging" and returns (because all the rest of the > code is guarded by the 'if'). Execution then continues where it left > off, in the parent." > > Because I am not sure how the control can go back to top of the function unless there is no loops there. > It doesn't. The function simply returns and execution resumes in the parent, i.e. in the calling function at depth-1, where it left off. In Python, a return None is implied when a function falls off its end. > Also, Can you please let me know how did you found out that I am using Python 2 Interpreter. print as a statement (without parentheses) only works in Python 2, in Python 3 print is a function. > > Bharath > >