Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'that?': 0.05; 'worse': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'def': 0.12; '"w")': 0.16; 'cares': 0.16; 'effect,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:generator': 0.16; 'value"': 0.16; 'values:': 0.16; 'wrote:': 0.18; 'value.': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; '15,': 0.26; 'second': 0.26; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'usual': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'returning': 0.36; 'doing': 0.36; 'rather': 0.38; 'how': 0.40; 'such': 0.63; 'more': 0.64; 'between': 0.67; 'mar': 0.68; '2015': 0.84; 'distinguish': 0.84; 'returns.': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=71h+Rbw0x1yNS4+dwvhPAMr/1qBgntKbMwxZLTWdWqQ=; b=LTcfRVdF5MfP/mV4Vk3sT9ZVTaAwEUB/J82hyoeFvRfiBdQs2IL6/tkIgb12YMROlS 3ECsXXSy1MF9EEtICbjyZjG1h3yoFTH5ButCHIZT/+taOR36HlMa8YELR/b1ZQYd09aV pEHyCRnkEFcyJf0lKU8HDy3h7HTm7EmNLDFyNEyENytm12NY2KVbZX6cynP+9XV2AlOy TcUjumAP6PFgKYlWH0Gqkgw0BOU9w1cso9nYJ6JJcObhB9rOXCD97XPz4Kkek4mAEduF bciYqgascjS1Y3dN1xgQfQmpZOqZCdn6tgnCwQS7zi5Kl7oyDxM/bVtKH1vgRE+zBXc5 aoyA== MIME-Version: 1.0 X-Received: by 10.42.159.132 with SMTP id l4mr64470291icx.59.1426351909099; Sat, 14 Mar 2015 09:51:49 -0700 (PDT) In-Reply-To: <976313df-00f6-4845-a774-e5902b0fb2ce@googlegroups.com> References: <5501be8b$0$13006$c3e8da3$5496439d@news.astraweb.com> <87twxqqewm.fsf@elektro.pacujo.net> <4eec1709-dd11-4891-bfcc-60b27bb00ee3@googlegroups.com> <550259bf$0$12975$c3e8da3$5496439d@news.astraweb.com> <00d9152a-f391-4c64-b2bd-52bdec2a6b67@googlegroups.com> <8761a5s0he.fsf@elektro.pacujo.net> <5503cf5f$0$12985$c3e8da3$5496439d@news.astraweb.com> <83d579c1-ab61-4a3d-a834-e65d28eace8a@googlegroups.com> <976313df-00f6-4845-a774-e5902b0fb2ce@googlegroups.com> Date: Sun, 15 Mar 2015 03:51:48 +1100 Subject: Re: generator/coroutine terminology From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.19 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: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1426351918 news.xs4all.nl 2941 [2001:888:2000:d::a6]:49301 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:87429 On Sun, Mar 15, 2015 at 3:33 AM, Rustom Mody wrote: > As best as I can see python makes no distinction between such a foo and > the more usual function/methods that have no returns. > You can I can talk about these and distinguish them > Python has no clue about it. But what support is actually needed? Look, I can write functions that return values: def square(x): return x*x four = square(2) and functions that don't: def save_to_file(fn): with open(fn, "w") as f: f.write(stuff) f.write(more_stuff) save_to_file("/tmp/asdf") Who cares that the second one actually returns None and then ignores that? It's not returning anything, it's not using the function return value. This is, in effect, a procedure. How is Python worse off for doing things this way rather than having a true "function with no return value" or "procedure" concept? ChrisA