Skip to content
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

Update json-yaml.md #462

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion docs/cheatsheet/args-and-kwargs.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Python Args and Kwargs
</base-disclaimer-content>
</base-disclaimer>

Read the article <router-link to="/blog/python-easy-args-kwargs">Python \*args and \*\*kwargs Made Easy</router-link> for a more in deep introduction.
Read the article <router-link to="/blog/python-easy-args-kwargs">Python \*args and \*\*kwargs Made Easy</router-link> for a more in depth introduction.

## Args and Kwargs

Expand Down
2 changes: 1 addition & 1 deletion docs/cheatsheet/dataclasses.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ It is easy to add default values to the fields of your data class.

## Type hints

It is mandatory to define the data type in dataclass. However, If you would rather not specify the datatype then, use `typing.Any`.
It is mandatory to define the data type in dataclass. However, if you would rather not specify the datatype, then use `typing.Any`.

```python
>>> from dataclasses import dataclass
Expand Down
2 changes: 1 addition & 1 deletion docs/cheatsheet/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Say you wrote a function to calculate the factorial of a number. In mathematics,
>>> def factorial(n):
... logging.debug('Start of factorial(%s)' % (n))
... total = 1
... for i in range(1, n + 1):
... for i in range(0, n + 1):
... total *= i
... logging.debug('i is ' + str(i) + ', total is ' + str(total))
... logging.debug('End of factorial(%s)' % (n))
Expand Down
2 changes: 1 addition & 1 deletion docs/cheatsheet/exception-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Python Exception Handling
</base-disclaimer-content>
</base-disclaimer>

Python has many [built-in exceptions](https://docs.python.org/3/library/exceptions.html) that are raised when a program encounters an error, and most external libraries, like the popular [Requests](https://requests.readthedocs.io/en/latest), include his own [custom exceptions](https://requests.readthedocs.io/en/latest/user/quickstart/#errors-and-exceptions) that we will need to deal to.
Python has many [built-in exceptions](https://docs.python.org/3/library/exceptions.html) that are raised when a program encounters an error, and most external libraries, like the popular [Requests](https://requests.readthedocs.io/en/latest), include their own [custom exceptions](https://requests.readthedocs.io/en/latest/user/quickstart/#errors-and-exceptions) that we will need to deal with.

## Basic exception handling

Expand Down
5 changes: 3 additions & 2 deletions docs/cheatsheet/json-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ There are two main libraries allowing to access to YAML files:

Install them using `pip install` in your virtual environment.

The first one is easier to use but the second one, Ruamel, implements much better the YAML
specification, and allow for example to modify a YAML content without altering comments.
The first one is easier to use, but the second one, Ruamel, implements the YAML
specification much better, and allows, for example, to modify a YAML content
without altering comments.

Open a YAML file with:

Expand Down