Skip to content

Commit e1b0016

Browse files
committed
[SQUASH]
1 parent 50fb01f commit e1b0016

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

_posts/2018-08-12-walkthrough-with-features-introduced-in-core-python-3-7.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,29 @@ In this post, I will try to explain improvements done in Core Python version
2424

2525
* Hash-based Python object file
2626

27-
* Breakpoint:
27+
### Breakpoint
2828

2929
* breakpoint():
3030

31-
Breakpoints are extream important for debugging. Since I started learning
31+
Breakpoints are extream important tool for debugging. Since I started learning
3232
Python, I am using the same API for putting breakpoints. With this release,
33-
breakpoint() is a new built-in function for putting breakpoints in your code.
34-
This way is handier than its previous way which is importing and calling a
35-
set_trace method from the pdb module like pdb.set_trace
33+
breakpoint() is introduced as n new built-in function which can be used for
34+
putting breakpoints in your code. Putting breakpoint by calling a breakpoint
35+
function is handier than importing a ```pdf.set_trace()```.
3636

3737
Below is the example of putting a breakpoint in your program:
3838

39-
# Note: A Gif will be more batter example for this.
39+
![Breakpoint function in Python 3.7](/assets/images/walkthrough_python_3_7/breakpoint_example.gif)
4040

41-
'''python
42-
>>> for i in range(5):
43-
... if i % 2 == 0:
44-
... breakpoint()
45-
... else:
46-
... print(i)
47-
...
48-
'''
41+
Source code
42+
```python
43+
for i in range(100):
44+
if i == 10:
45+
breakpoint()
46+
else:
47+
print(i)
48+
49+
```
4950

5051
Explanation:
5152

Loading

0 commit comments

Comments
 (0)