[issue31861] aiter() and anext() built-in functions

2018-08-23 Thread Joshua Bronson


Change by Joshua Bronson :


--
keywords: +patch
pull_requests: +8368
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31861] aiter() and anext() built-in functions

2018-06-24 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31861] aiter() and anext() built-in functions

2018-06-24 Thread Joshua Bronson


Change by Joshua Bronson :


--
nosy: +jab

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31861] aiter() and anext() built-in functions

2018-06-14 Thread Yury Selivanov


Yury Selivanov  added the comment:

> Do these really need to be builtins?

We're only beginning to see async iterators being used in the wild, so we can't 
have a definitive answer at this point.

> They seem too specialized to be widely useful; I've personally never needed 
> them in any async code I've written. It would make more sense to me to put 
> them in a module like operators.

I think putting them to the operators module makes sense, at least for 3.8.  Do 
you want to work on a pull request?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31861] aiter() and anext() built-in functions

2018-06-14 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Do these really need to be builtins?

They seem too specialized to be widely useful; I've personally never needed 
them in any async code I've written. It would make more sense to me to put them 
in a module like operators.

--
nosy: +Jelle Zijlstra

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31861] aiter() and anext() built-in functions

2018-06-12 Thread Julian Mehnle


Change by Julian Mehnle :


--
nosy: +jmehnle

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31861] aiter() and anext() built-in functions

2017-10-27 Thread Davide Rizzo

Davide Rizzo  added the comment:

I attempted to make a Python implementation (attached) to use in my code. There 
are a few questions in the comments.

One of the complications is the async equivalent of next with two arguments 
like next(iterator, default). It cannot return the result of __anext__() 
because it needs to catch StopAsyncIteration. So it should return an awaitable 
wrapper instead (in my Python code this is rendered as a coroutine). A 
secondary question is whether the default value should be returned as it is 
passed, or awaited on.

--
Added file: https://bugs.python.org/file47242/aiter_comp.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31861] aiter() and anext() built-in functions

2017-10-24 Thread Yury Selivanov

Yury Selivanov  added the comment:

> No, just this tracker issue, a PR and a reviewer. (Sorry, I can't review
CPython code myself any more.)

Alright, I'll work on a PR after PEP 55x.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31861] aiter() and anext() built-in functions

2017-10-24 Thread Guido van Rossum

Guido van Rossum  added the comment:

> do we need a PEP to add aiter() and anext() builtins?

No, just this tracker issue, a PR and a reviewer. (Sorry, I can't review
CPython code myself any more.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31861] aiter() and anext() built-in functions

2017-10-24 Thread Yury Selivanov

Yury Selivanov  added the comment:

Guido, do we need a PEP to add aiter() and anext() builtins?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31861] aiter() and anext() built-in functions

2017-10-24 Thread Davide Rizzo

Change by Davide Rizzo :


--
nosy: +gvanrossum, yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31861] aiter() and anext() built-in functions

2017-10-24 Thread Davide Rizzo

New submission from Davide Rizzo :

PEP 525 suggested that adding aiter() and anext() would need to wait until 
async __aiter__ is dropped in 3.7. Issue 31709 solved that, so now it would be 
possible to add them.

--
components: Library (Lib)
messages: 304910
nosy: davide.rizzo
priority: normal
severity: normal
status: open
title: aiter() and anext() built-in functions
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com