From 9cb5fe99cade09a2f33f444bb005a5dcf69b68e9 Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Wed, 25 Jan 2023 08:24:44 -0700 Subject: Make new tag for #2360 --- bot/resources/tags/in-place.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 bot/resources/tags/in-place.md diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md new file mode 100644 index 000000000..361dfd111 --- /dev/null +++ b/bot/resources/tags/in-place.md @@ -0,0 +1,5 @@ +**Out of Place** and **In Place** + +- An "out of place" operation is one that creates a new object, leaving the original object unchanged. +- An "in place" operation is one that modifies the original object, without creating a new one. + -- cgit v1.2.3 From a0bfba540a0fedabe3f3e3625ac829c614fd4b82 Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Wed, 25 Jan 2023 08:45:24 -0700 Subject: Update in-place.md --- bot/resources/tags/in-place.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 361dfd111..c81fa660a 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -1,5 +1,24 @@ **Out of Place** and **In Place** -- An "out of place" operation is one that creates a new object, leaving the original object unchanged. -- An "in place" operation is one that modifies the original object, without creating a new one. +- An "out of place" operation creates a new object, leaving the original object unchanged. +- An "in place" operation modifies the original object, without creating a new one. These return None explicitly. +A prime example of these different ideas is `list.sort()` vs `sorted(...)`: + +`list.sort()` can cause many errors within your code, one of the most common is shown below: + +```py +a_list = [3, 1, 2] +a_new_list = a_list.sort() # This will be None +print(a_new_list[1]) # This will error +``` + +On the other hand, `sorted()` can also cause errors: + +```py +a_list = [3, 1, 2] +sorted(a_list) +print(a_list[0]) # You may expect 1, but it will print 3 +``` + +Both of these errors are an easy fixes. -- cgit v1.2.3 From 27eb0f9eb1a3795ed6eeadb3d9b35e9de29831e9 Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Wed, 25 Jan 2023 15:54:23 -0700 Subject: Update in-place.md --- bot/resources/tags/in-place.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index c81fa660a..9f6ec6402 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -5,7 +5,7 @@ A prime example of these different ideas is `list.sort()` vs `sorted(...)`: -`list.sort()` can cause many errors within your code, one of the most common is shown below: +This is a common use for `list.sort()` which will end in an error. ```py a_list = [3, 1, 2] @@ -13,7 +13,7 @@ a_new_list = a_list.sort() # This will be None print(a_new_list[1]) # This will error ``` -On the other hand, `sorted()` can also cause errors: +This is a common use for `sorted()` which will end in a unexpected result. ```py a_list = [3, 1, 2] @@ -21,4 +21,4 @@ sorted(a_list) print(a_list[0]) # You may expect 1, but it will print 3 ``` -Both of these errors are an easy fixes. +To fix this you just need to set a new variable to `sorted(a_list)`, and don't create a new list for `list.sort()` -- cgit v1.2.3 From 8b2573cb5ef87ffe1697a20ef5f2a7b137f432ee Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Wed, 25 Jan 2023 15:59:16 -0700 Subject: Make explanation more concise, and informational --- bot/resources/tags/in-place.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 9f6ec6402..49f9bfe2f 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -1,11 +1,10 @@ **Out of Place** and **In Place** -- An "out of place" operation creates a new object, leaving the original object unchanged. -- An "in place" operation modifies the original object, without creating a new one. These return None explicitly. +In programming, there are two types of operations: "out of place" and "in place". An "out of place" operation creates a new object, leaving the original object unchanged. An "in place" operation modifies the original object, without creating a new one. These operations return None explicitly. -A prime example of these different ideas is `list.sort()` vs `sorted(...)`: +A common example of these different concepts is seen in the use of the methods `list.sort()` and sorted(...) in Python. Using `list.sort()` will modify the original list and return None, so attempting to access an element of the list after calling `sort()` will result in an error. -This is a common use for `list.sort()` which will end in an error. +For example, the following code will result in an error: ```py a_list = [3, 1, 2] @@ -13,7 +12,7 @@ a_new_list = a_list.sort() # This will be None print(a_new_list[1]) # This will error ``` -This is a common use for `sorted()` which will end in a unexpected result. +On the other hand, using `sorted(...)` will return a new sorted list, leaving the original list unchanged. This means that if you expect the original list to be sorted, you will be disappointed with the result. For example, the following code will print 3 instead of 1: ```py a_list = [3, 1, 2] @@ -21,4 +20,4 @@ sorted(a_list) print(a_list[0]) # You may expect 1, but it will print 3 ``` -To fix this you just need to set a new variable to `sorted(a_list)`, and don't create a new list for `list.sort()` +To avoid these errors and unexpected results, it is required to assign the result of sorted(...) to a new variable and use list.sort() method in the original list. This way, the original list will be sorted and the new list will be created with the sorted elements. -- cgit v1.2.3 From bb890bbbfa9a5aca03b5cc38791e71d915086557 Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Thu, 26 Jan 2023 11:04:12 -0700 Subject: Add clarifying details Co-authored-by: Caeden Perelli-Harris --- bot/resources/tags/in-place.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 49f9bfe2f..880f82527 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -9,7 +9,7 @@ For example, the following code will result in an error: ```py a_list = [3, 1, 2] a_new_list = a_list.sort() # This will be None -print(a_new_list[1]) # This will error +print(a_new_list[1]) # This will error because it is empty ``` On the other hand, using `sorted(...)` will return a new sorted list, leaving the original list unchanged. This means that if you expect the original list to be sorted, you will be disappointed with the result. For example, the following code will print 3 instead of 1: -- cgit v1.2.3 From 053c5edda0bbca2b7c7d96046b0a7befa767666b Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Thu, 26 Jan 2023 11:04:26 -0700 Subject: Add clarifying details Co-authored-by: Caeden Perelli-Harris --- bot/resources/tags/in-place.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 880f82527..2a9a1db2f 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -12,7 +12,7 @@ a_new_list = a_list.sort() # This will be None print(a_new_list[1]) # This will error because it is empty ``` -On the other hand, using `sorted(...)` will return a new sorted list, leaving the original list unchanged. This means that if you expect the original list to be sorted, you will be disappointed with the result. For example, the following code will print 3 instead of 1: +On the other hand, using the function `sorted(...)` will return a new sorted list, leaving the original list unchanged. This means that if you expect the original list to be sorted, you will be disappointed with the result. For example, the following code will print 3 instead of 1: ```py a_list = [3, 1, 2] -- cgit v1.2.3 From c7bc8a084357216fbe118ad0983cf0d51affa3aa Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Thu, 26 Jan 2023 11:04:46 -0700 Subject: Add missing code blocks Co-authored-by: Caeden Perelli-Harris --- bot/resources/tags/in-place.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 2a9a1db2f..f1d3090fd 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -20,4 +20,4 @@ sorted(a_list) print(a_list[0]) # You may expect 1, but it will print 3 ``` -To avoid these errors and unexpected results, it is required to assign the result of sorted(...) to a new variable and use list.sort() method in the original list. This way, the original list will be sorted and the new list will be created with the sorted elements. +To avoid these errors and unexpected results, it is required to assign the result of `sorted(...)` to a new variable and use `list.sort()` method in the original list. This way, the original list will be sorted and the new list will be created with the sorted elements. -- cgit v1.2.3 From ae70912045d5c817acecdf0025dd00f6cbb846a6 Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Thu, 26 Jan 2023 11:05:48 -0700 Subject: Clarify empty and why it errors. --- bot/resources/tags/in-place.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index f1d3090fd..8c5df89c9 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -9,7 +9,7 @@ For example, the following code will result in an error: ```py a_list = [3, 1, 2] a_new_list = a_list.sort() # This will be None -print(a_new_list[1]) # This will error because it is empty +print(a_new_list[1]) # This will error because it is NoneType and not a list ``` On the other hand, using the function `sorted(...)` will return a new sorted list, leaving the original list unchanged. This means that if you expect the original list to be sorted, you will be disappointed with the result. For example, the following code will print 3 instead of 1: -- cgit v1.2.3 From 413cfd38d7e9af22f7428d3afd16faac63e67d77 Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Fri, 27 Jan 2023 13:57:45 -0700 Subject: Small Minimization Changes --- bot/resources/tags/in-place.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 8c5df89c9..7782175a2 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -2,19 +2,13 @@ In programming, there are two types of operations: "out of place" and "in place". An "out of place" operation creates a new object, leaving the original object unchanged. An "in place" operation modifies the original object, without creating a new one. These operations return None explicitly. -A common example of these different concepts is seen in the use of the methods `list.sort()` and sorted(...) in Python. Using `list.sort()` will modify the original list and return None, so attempting to access an element of the list after calling `sort()` will result in an error. - -For example, the following code will result in an error: +A common example of these different concepts is seen in the use of the methods `list.sort()` and `sorted(...)`. Using `list.sort()` and attempting to access an element of the list after calling `sort()` will result in an error. ```py a_list = [3, 1, 2] a_new_list = a_list.sort() # This will be None print(a_new_list[1]) # This will error because it is NoneType and not a list -``` -On the other hand, using the function `sorted(...)` will return a new sorted list, leaving the original list unchanged. This means that if you expect the original list to be sorted, you will be disappointed with the result. For example, the following code will print 3 instead of 1: - -```py a_list = [3, 1, 2] sorted(a_list) print(a_list[0]) # You may expect 1, but it will print 3 -- cgit v1.2.3 From aacbdb080c1dd8da6304692c985b0f695b5b4b63 Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Fri, 27 Jan 2023 17:28:56 -0700 Subject: More minimizations --- bot/resources/tags/in-place.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 7782175a2..a19fc1b30 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -1,8 +1,8 @@ **Out of Place** and **In Place** -In programming, there are two types of operations: "out of place" and "in place". An "out of place" operation creates a new object, leaving the original object unchanged. An "in place" operation modifies the original object, without creating a new one. These operations return None explicitly. +In programming, there are two types of operations: "out of place" operations creates a new object, leaving the original object unchanged. "in place" operations modifies the original object, without creating a new one. These operations return None explicitly. -A common example of these different concepts is seen in the use of the methods `list.sort()` and `sorted(...)`. Using `list.sort()` and attempting to access an element of the list after calling `sort()` will result in an error. +A common example of these different concepts is seen in the use of the methods `list.sort()` and `sorted(...)`. Using `list.sort()` and attempting to access an element of the list will result in an error. ```py a_list = [3, 1, 2] -- cgit v1.2.3 From a3ddebe8d6686832c4a3fedfc435e7b4d643e1d6 Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Fri, 27 Jan 2023 17:54:24 -0700 Subject: Clarify words Co-authored-by: dawn <78233879+dawnofmidnight@users.noreply.github.com> --- bot/resources/tags/in-place.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index a19fc1b30..ca48d4de5 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -1,6 +1,6 @@ **Out of Place** and **In Place** -In programming, there are two types of operations: "out of place" operations creates a new object, leaving the original object unchanged. "in place" operations modifies the original object, without creating a new one. These operations return None explicitly. +In programming, there are two types of operations: "out of place" operations create a new object, leaving the original object unchanged. "in place" operations modify the original object, without creating a new one. These operations return None explicitly. A common example of these different concepts is seen in the use of the methods `list.sort()` and `sorted(...)`. Using `list.sort()` and attempting to access an element of the list will result in an error. -- cgit v1.2.3 -- cgit v1.2.3 From b4ab5429fc74c9a7300a73f352a583c853c32c27 Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Fri, 27 Jan 2023 17:58:14 -0700 Subject: Update list names --- bot/resources/tags/in-place.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index ca48d4de5..d120f9b08 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -5,13 +5,13 @@ In programming, there are two types of operations: "out of place" operations cre A common example of these different concepts is seen in the use of the methods `list.sort()` and `sorted(...)`. Using `list.sort()` and attempting to access an element of the list will result in an error. ```py -a_list = [3, 1, 2] -a_new_list = a_list.sort() # This will be None +inplace_list = [3, 1, 2] +a_new_list = inplace_list.sort() # This will be None print(a_new_list[1]) # This will error because it is NoneType and not a list -a_list = [3, 1, 2] -sorted(a_list) -print(a_list[0]) # You may expect 1, but it will print 3 +outofplace_list = [3, 1, 2] +sorted(outofplace_list) +print(outofplace_list[0]) # You may expect 1, but it will print 3 ``` To avoid these errors and unexpected results, it is required to assign the result of `sorted(...)` to a new variable and use `list.sort()` method in the original list. This way, the original list will be sorted and the new list will be created with the sorted elements. -- cgit v1.2.3 From 83f3167bdf6d6320dda40d3ed90dbad13ca7c4d0 Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Sat, 28 Jan 2023 11:38:00 -0700 Subject: Clarify comments --- bot/resources/tags/in-place.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index d120f9b08..7ed957bdc 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -7,11 +7,11 @@ A common example of these different concepts is seen in the use of the methods ` ```py inplace_list = [3, 1, 2] a_new_list = inplace_list.sort() # This will be None -print(a_new_list[1]) # This will error because it is NoneType and not a list +print(a_new_list) # Outputs None. Where did the list go? outofplace_list = [3, 1, 2] sorted(outofplace_list) -print(outofplace_list[0]) # You may expect 1, but it will print 3 +print(outofplace_list) # The list still isn't sorted. Why? ``` To avoid these errors and unexpected results, it is required to assign the result of `sorted(...)` to a new variable and use `list.sort()` method in the original list. This way, the original list will be sorted and the new list will be created with the sorted elements. -- cgit v1.2.3 From d959f7690f919b915c1375704e30de2a1438b8ee Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Sat, 28 Jan 2023 18:37:37 -0700 Subject: Update list names, and add clarifying comments --- bot/resources/tags/in-place.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 7ed957bdc..0144a840b 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -5,13 +5,15 @@ In programming, there are two types of operations: "out of place" operations cre A common example of these different concepts is seen in the use of the methods `list.sort()` and `sorted(...)`. Using `list.sort()` and attempting to access an element of the list will result in an error. ```py -inplace_list = [3, 1, 2] -a_new_list = inplace_list.sort() # This will be None -print(a_new_list) # Outputs None. Where did the list go? +# WRONG: -outofplace_list = [3, 1, 2] -sorted(outofplace_list) -print(outofplace_list) # The list still isn't sorted. Why? +unsorted_list = [3, 1, 2] +sorted_list = inplace_list.sort() # This will be None +print(sorted_list) # Outputs None. Where did the list go? + +list_to_sort = [3, 1, 2] +sorted(list_to_sort) +print(list_to_sort) # The list still isn't sorted. Why? ``` To avoid these errors and unexpected results, it is required to assign the result of `sorted(...)` to a new variable and use `list.sort()` method in the original list. This way, the original list will be sorted and the new list will be created with the sorted elements. -- cgit v1.2.3 From e50149264c3f33fe5625cb611db44cc5ba521351 Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Wed, 8 Feb 2023 08:28:35 -0700 Subject: Update wording Co-authored-by: dawn <78233879+dawnofmidnight@users.noreply.github.com> --- bot/resources/tags/in-place.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 0144a840b..bd36300f5 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -8,7 +8,7 @@ A common example of these different concepts is seen in the use of the methods ` # WRONG: unsorted_list = [3, 1, 2] -sorted_list = inplace_list.sort() # This will be None +sorted_list = unsorted_list.sort() # This will be None print(sorted_list) # Outputs None. Where did the list go? list_to_sort = [3, 1, 2] -- cgit v1.2.3 From a650c089ffb843f0e1a9caf032822d7490b9b5d5 Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Wed, 15 Mar 2023 22:46:54 -0600 Subject: Comply to #2419 Co-authored-by: Mohammad Ibrahim <74553450+Ibrahim2750mi@users.noreply.github.com> --- bot/resources/tags/in-place.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index bd36300f5..61f70256b 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -1,4 +1,7 @@ -**Out of Place** and **In Place** +--- +embed: + title: "Out of place and in place" +--- In programming, there are two types of operations: "out of place" operations create a new object, leaving the original object unchanged. "in place" operations modify the original object, without creating a new one. These operations return None explicitly. -- cgit v1.2.3 From 628d254e877c03bfc775adc3fa4810488c1481ff Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Wed, 15 Mar 2023 22:48:36 -0600 Subject: Comply to PEP8 Co-authored-by: Mohammad Ibrahim <74553450+Ibrahim2750mi@users.noreply.github.com> --- bot/resources/tags/in-place.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 61f70256b..0fd672cf0 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -11,7 +11,7 @@ A common example of these different concepts is seen in the use of the methods ` # WRONG: unsorted_list = [3, 1, 2] -sorted_list = unsorted_list.sort() # This will be None +sorted_list = unsorted_list.sort() # This will be None print(sorted_list) # Outputs None. Where did the list go? list_to_sort = [3, 1, 2] -- cgit v1.2.3 From cb48b72b26edf21554fb34564da93ddc99032c2a Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Sat, 25 Mar 2023 19:14:18 -0600 Subject: Update required wording --- bot/resources/tags/in-place.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 0fd672cf0..0fb11de8b 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -19,4 +19,4 @@ sorted(list_to_sort) print(list_to_sort) # The list still isn't sorted. Why? ``` -To avoid these errors and unexpected results, it is required to assign the result of `sorted(...)` to a new variable and use `list.sort()` method in the original list. This way, the original list will be sorted and the new list will be created with the sorted elements. +To avoid these errors and unexpected results, you should either use an out-of-place operation `(sorted(...))` and assign it to a variable or use an in-place operation `(list.sort())` without assignment. -- cgit v1.2.3 From 26959a11a06a5ae221dc754bb8a0f762a4eb6d5c Mon Sep 17 00:00:00 2001 From: Brody Critchlow Date: Tue, 28 Mar 2023 15:56:44 -0600 Subject: Change Wording Co-authored-by: dawn <78233879+dawnofmidnight@users.noreply.github.com> --- bot/resources/tags/in-place.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 0fb11de8b..2813b9e57 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -3,7 +3,7 @@ embed: title: "Out of place and in place" --- -In programming, there are two types of operations: "out of place" operations create a new object, leaving the original object unchanged. "in place" operations modify the original object, without creating a new one. These operations return None explicitly. +In programming, there are two types of operations: "out of place" operations create a new object, leaving the original object unchanged. "in place" operations modify the original object without creating a new one, and return `None` explicitly. A common example of these different concepts is seen in the use of the methods `list.sort()` and `sorted(...)`. Using `list.sort()` and attempting to access an element of the list will result in an error. -- cgit v1.2.3 From 96bb34468e50c3cb424e0eeb53eb49e0e4abb6ad Mon Sep 17 00:00:00 2001 From: brody critchlow Date: Wed, 29 Mar 2023 23:16:53 -0600 Subject: Fix InPlace precommit issues --- bot/resources/tags/in-place.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 2813b9e57..e2218a7df 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -5,7 +5,7 @@ embed: In programming, there are two types of operations: "out of place" operations create a new object, leaving the original object unchanged. "in place" operations modify the original object without creating a new one, and return `None` explicitly. -A common example of these different concepts is seen in the use of the methods `list.sort()` and `sorted(...)`. Using `list.sort()` and attempting to access an element of the list will result in an error. +A common example of these different concepts is seen in the use of the methods `list.sort()` and `sorted(...)`. Using `list.sort()` and attempting to access an element of the list will result in an error. ```py # WRONG: -- cgit v1.2.3