Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: PEP proposal: sequence expansion support for yield statement: yield * Date: Wed, 20 Apr 2016 15:53:44 -0400 Lines: 11 Message-ID: References: <573e61523bfc412ca8674b06d70f2fd7@sraex01sc.sisa.samsung.com> <1461182024.3047115.584804185.6B0800F9@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de gnieLE6wsOpoWpX18YbV4AZWmNC1jNcekn0mSIGjIYyQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:PEP': 0.07; 'received:internal': 0.09; 'wed,': 0.15; '*sequence': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'sequence:': 0.16; 'subject:yield': 0.16; 'wrote:': 0.16; '(the': 0.22; 'subject:support': 0.22; 'elements': 0.23; 'header :In-Reply-To:1': 0.24; 'sequence': 0.27; 'yield': 0.27; 'common': 0.33; 'follows:': 0.35; 'propose': 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'received:66': 0.38; 'to:addr:python.org': 0.40; 'header:Message-Id:1': 0.61; '20,': 0.66 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=T65esZ0pATvSQvh4AGKWawRWh/A=; b=VWVFKV 0wAp9T2oZcO62AWBsx/hZWin/L16e+RQHLzLkpO06D1abbh8RSEnZaqfcPDYWZ86 uf2Ga1kRpSItAg+0ypyAKSHGBKSDlh4BNzzYoRF1whmXavo+PM3/RxtQuoIDs47d 3cVsxPArhJLfYUGUOrVGYuDXGviSW+I/zTtic= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=T65esZ0pATvSQvh 4AGKWawRWh/A=; b=gEpFaDVud7pTBL9A4Pz4YDTG1B0/koTYI0biN1h6wAnVQYD Y1fWYoZW/P8baeIVyOy9Nx8q8fwvLuXeToSytgHC/WB6y+Kps4oWO3uYQp+AcoOE lTUcp6nn69IhzRnuLFKzyYD85l31601dM1kGCo0kIHKuy03mEPjn58A7MZFk= X-Sasl-Enc: ynxuj2Q4SyQCeQ6OsSMisyj/n6Mh35o7RNVnL86V1syy 1461182024 X-Mailer: MessagingEngine.com Webmail Interface - ajax-71fd8077 In-Reply-To: <573e61523bfc412ca8674b06d70f2fd7@sraex01sc.sisa.samsung.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <1461182024.3047115.584804185.6B0800F9@webmail.messagingengine.com> X-Mailman-Original-References: <573e61523bfc412ca8674b06d70f2fd7@sraex01sc.sisa.samsung.com> Xref: csiph.com comp.lang.python:107422 On Wed, Apr 20, 2016, at 15:34, Ken Seehart wrote: > Currently the common pattern for yielding the elements in a sequence is > as follows: > > for x in sequence: yield x > > I propose the following replacement (the result would be identical): > > yield *sequence yield from sequence