Skip to content

Fix examples #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"cSpell.words": [
"abspath",
"aiter",
"aitersync",
"Anyconfig",
"Arham",
"asctime",
Expand Down
23 changes: 9 additions & 14 deletions docs/builtin/aiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,16 @@ description: Return an asynchronous iterator for an asynchronous iterable. Equiv
From the <a target="_blank" href="https://docs.python.org/3/library/functions.html#aiter">Python 3 documentation</a>
</base-disclaimer-title>
<base-disclaimer-content>
<br/>
Return an asynchronous iterator for an asynchronous iterable. Equivalent to calling x.__aiter__().
Return an asynchronous iterator for an asynchronous iterable. Equivalent to calling x.__aiter__(). aiter() is an async equivalent of iter()
</base-disclaimer-content>
</base-disclaimer>

<base-disclaimer>
<base-disclaimer-content>
<br/>
aiter() is an async equivalent of iter(). <br/> Here's an example showing the use of aiter()
</base-disclaimer-content>
</base-disclaimer>
## Example

```async def aitersync(iterable):
results = []
async for x in aiter(iterable):
results.append(x)
return iter(results)
```
```python
>>> async def aitersync(iterable):
... results = []
... async for x in aiter(iterable):
... results.append(x)
... return iter(results)
```
35 changes: 18 additions & 17 deletions docs/builtin/breakpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,24 @@ description: This function drops you into the debugger at the call site. Specifi
<br/>
Python breakpoint() calls Python debugger at a given line
</base-disclaimer-content>

</base-disclaimer>

```
# Create a loop over 5 integers
for i in range(5):
# Stream i to stdout
print(i)
# Create breakpoint at # 3
if i == 3:
breakpoint()
#Output
0
1
2
3
> c:\users\user\path\to\your\project\example.py(24)<module>()
-> for i in range(5):
(Pdb)
## Example

```python
>>> # Create a loop over 5 integers
>>> for i in range(5):
... # Stream i to stdout
... print(i)
... # Create breakpoint at # 3
... if i == 3:
... breakpoint()
...
# 0
# 1
# 2
# 3
# > c:\users\user\path\to\your\project\example.py(24)<module>()
# -> for i in range(5):
# (Pdb)
```