Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60770 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52015 invoked from network); 6 Jun 2012 23:37:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2012 23:37:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qc0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:48093] helo=mail-qc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/23-29813-AC9EFCF4 for ; Wed, 06 Jun 2012 19:37:46 -0400 Received: by qcmt36 with SMTP id t36so7167qcm.29 for ; Wed, 06 Jun 2012 16:37:43 -0700 (PDT) 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:to :cc:content-type; bh=gT2SHJIbBAS3JwGhrGeGgmbavJRMjANicB++OLPp4Z4=; b=Wtj3SiD3JBGP+YlwM7sAiq3aPaLz/IW4aqlNVaznA/QoVtpKef5q8YVEd7BjoG+aUS 2f66lQxpSgtaVOzebCP1jtK9Hdp5YX+mItML7yHPHtYf520iOr+eEnmGA3Rr6f8PB0Wk SFzOUo2fWRcftF7dQrmHntDjh3c/JatU9IljA3Ma+vmtXtRKJ/d4+0Nh66zYXCzi71IV moIu7w0P0n3YN/3VTjy/AZEurvcC8q5HoMxVl/AJ4l67XD/lyDLfON8JmWPMglS/NybL ruMLwCBGP3Koer8Eq1RUAi3W0/KjC6oTz3uLNSYsb19EiVihwe40Wh5v/3FvQX1odLUw u3WA== MIME-Version: 1.0 Received: by 10.224.203.7 with SMTP id fg7mr625662qab.48.1339025863087; Wed, 06 Jun 2012 16:37:43 -0700 (PDT) Received: by 10.229.87.147 with HTTP; Wed, 6 Jun 2012 16:37:42 -0700 (PDT) In-Reply-To: References: <5361275d0179dd0f3061ceabf7bde9af@nebm.ist.utl.pt> Date: Wed, 6 Jun 2012 19:37:42 -0400 Message-ID: To: Nikita Popov Cc: Gustavo Lopes , internals PHP Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Generators in PHP From: ircmaxell@gmail.com (Anthony Ferrara) Nikita, > I don't know whether that behavior is of any use, so I'll gladly > change the behavior to throwing an exception if that's more desirable. You can't throw an exception from rewind, since it's called before foreach(). So it wouldn't be iterable then. I think the noop on rewind is valid in this context, as long as it's documented... Anthony