Skip to content

This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.

898 B
Raw Blame

title: Python aiter() built-in function - Python Cheatsheet description: Return an asynchronous iterator for an asynchronous iterable. Equivalent to calling x.aiter().

Python aiter() built-in function From the Python 3 documentation Return an asynchronous iterator for an asynchronous iterable. Equivalent to calling x.__aiter__(). aiter() is an async equivalent of iter()

Example

>>> async def aitersync(iterable):
...    results = []
...    async for x in aiter(iterable):
...        results.append(x)
...    return iter(results)