rfc:generator-return-expressions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:generator-return-expressions [2015/03/09 16:22] – Add explanation for by-reference returns rdlowreyrfc:generator-return-expressions [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 4: Line 4:
   * Author: Daniel Lowrey <rdlowrey@php.net>   * Author: Daniel Lowrey <rdlowrey@php.net>
   * Contributors: Nikita Popov <nikic@php.net>   * Contributors: Nikita Popov <nikic@php.net>
-  * Status: Under Discussion+  * Status: Implemented (in PHP 7.0)
   * First Published at: http://wiki.php.net/rfc/generator-return-expressions   * First Published at: http://wiki.php.net/rfc/generator-return-expressions
  
Line 174: Line 174:
  
  
-==== Reference Returns ====+===== Reference Returns =====
  
 Generators currently utilize the `&` operator to indicate values will be yielded by-reference: Generators currently utilize the `&` operator to indicate values will be yielded by-reference:
Line 278: Line 278:
  
  
-===== Proposed Voting Choices ===== +===== Vote =====
-Two voting choices are proposed:+
  
-1. **YES**, allow Generator return expressions and ''expose Generator::getReturn()'' to access returned values in PHP 7 +Voting begins 2015-03-09 and ends on 2015-03-16.
- +
-2**NO**, do not modify existing Generator behavior+
  
 A 2/3 "Yes" vote is required to implement this proposal. A 2/3 "Yes" vote is required to implement this proposal.
 +
 +
 +<doodle title="Allow Generator return expressions in PHP7" auth="rdlowrey" voteType="single" closed="true">
 +   * Yes
 +   * No
 +</doodle>
 +
 +. Vote closed at 14:50 UTC 2015-03-17.
 +
 +**NOTE:** the related [[rfc:generator-delegation|Generator Delegation]] RFC depends on the acceptance of this proposal.
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
Line 301: Line 308:
 [[https://docs.python.org/3/whatsnew/3.3.html#pep-380|New in Python 3.3: yield from]] [[https://docs.python.org/3/whatsnew/3.3.html#pep-380|New in Python 3.3: yield from]]
  
-===== Rejected Features ===== 
-TBD 
rfc/generator-return-expressions.1425918128.txt.gz · Last modified: 2017/09/22 13:28 (external edit)