diff --git a/docs/cheatsheet/args-and-kwargs.md b/docs/cheatsheet/args-and-kwargs.md index a94a3e60..550057d5 100644 --- a/docs/cheatsheet/args-and-kwargs.md +++ b/docs/cheatsheet/args-and-kwargs.md @@ -16,7 +16,7 @@ Python Args and Kwargs -Read the article Python \*args and \*\*kwargs Made Easy for a more in deep introduction. +Read the article Python \*args and \*\*kwargs Made Easy for a more in depth introduction. ## Args and Kwargs diff --git a/docs/cheatsheet/dataclasses.md b/docs/cheatsheet/dataclasses.md index a41b3c48..2007d0fc 100644 --- a/docs/cheatsheet/dataclasses.md +++ b/docs/cheatsheet/dataclasses.md @@ -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 diff --git a/docs/cheatsheet/debugging.md b/docs/cheatsheet/debugging.md index b4edf43e..5fbc543f 100644 --- a/docs/cheatsheet/debugging.md +++ b/docs/cheatsheet/debugging.md @@ -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)) diff --git a/docs/cheatsheet/exception-handling.md b/docs/cheatsheet/exception-handling.md index 87d1b4fb..201fe24b 100644 --- a/docs/cheatsheet/exception-handling.md +++ b/docs/cheatsheet/exception-handling.md @@ -16,7 +16,7 @@ Python Exception Handling -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 diff --git a/docs/cheatsheet/json-yaml.md b/docs/cheatsheet/json-yaml.md index 75fc6fb6..887886ca 100644 --- a/docs/cheatsheet/json-yaml.md +++ b/docs/cheatsheet/json-yaml.md @@ -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: