From 754efebbb5dd26f9be3c37470db4ae262db75d18 Mon Sep 17 00:00:00 2001 From: skyunna <42182835+skyunna@users.noreply.github.com> Date: Sat, 21 Dec 2024 16:40:52 -0500 Subject: [PATCH 1/6] Update json-yaml.md Typo fix --- docs/cheatsheet/json-yaml.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cheatsheet/json-yaml.md b/docs/cheatsheet/json-yaml.md index 75fc6fb6..f00cdaac 100644 --- a/docs/cheatsheet/json-yaml.md +++ b/docs/cheatsheet/json-yaml.md @@ -38,8 +38,8 @@ 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: From eb4cdf468872e1762a7a1e94b83a08bba4a03b2b Mon Sep 17 00:00:00 2001 From: skyunna <42182835+skyunna@users.noreply.github.com> Date: Sat, 21 Dec 2024 17:22:03 -0500 Subject: [PATCH 2/6] Update json-yaml.md Typo fix and reducing line length --- docs/cheatsheet/json-yaml.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/cheatsheet/json-yaml.md b/docs/cheatsheet/json-yaml.md index f00cdaac..887886ca 100644 --- a/docs/cheatsheet/json-yaml.md +++ b/docs/cheatsheet/json-yaml.md @@ -39,7 +39,8 @@ 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 the YAML -specification much better, and allows, for example, to modify a YAML content without altering comments. +specification much better, and allows, for example, to modify a YAML content +without altering comments. Open a YAML file with: From 351f9acf769f2a8bb94fd1f3adeb875f5f5f36c5 Mon Sep 17 00:00:00 2001 From: skyunna <42182835+skyunna@users.noreply.github.com> Date: Sat, 21 Dec 2024 17:23:58 -0500 Subject: [PATCH 3/6] Update exception-handling.md Typo fix --- docs/cheatsheet/exception-handling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 868b36892ed85b4fc4b52e850050005dadd88029 Mon Sep 17 00:00:00 2001 From: skyunna <42182835+skyunna@users.noreply.github.com> Date: Sun, 22 Dec 2024 14:03:02 -0500 Subject: [PATCH 4/6] Update debugging.md Text and code mismatch - to have a bug in factorial function, the range should be from 0 to n + 1. This way it aligns with the output. --- docs/cheatsheet/debugging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) From 33710d32be933967c6f48f82073eafc24d1af0f2 Mon Sep 17 00:00:00 2001 From: skyunna <42182835+skyunna@users.noreply.github.com> Date: Mon, 23 Dec 2024 19:21:07 -0500 Subject: [PATCH 5/6] Update args-and-kwargs.md Typo fix --- docs/cheatsheet/args-and-kwargs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From ee807580dcb79c0314b25ad1d1185450d285f54b Mon Sep 17 00:00:00 2001 From: skyunna <42182835+skyunna@users.noreply.github.com> Date: Sat, 28 Dec 2024 19:54:37 -0500 Subject: [PATCH 6/6] Update dataclasses.md Typo fix --- docs/cheatsheet/dataclasses.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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