GeezerVison is showing github.com — Fix some typos · python043/learn-python3@ea5d4a3
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: notebooks/intermediate/html/std_lib2.html +7-7Lines changed: 7 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -11857,7 +11857,7 @@ <h3 id="Encoding">Encoding<a class="anchor-link" href="#Encoding">¶</a></h3 | 11857 | 11857 |
| 11858 | 11858 |
| 11859 | 11859 | <div class="output_subarea output_stream output_stdout output_text"> | 11860 | | -<pre>type: <class 'str'> data: {"a": 1, "some_list": [1, 2, 3], "b": true, "c": null, "nested": {"foo": "bar"}} | | 11860 | +<pre>type: <class 'str'> data: {"c": null, "b": true, "some_list": [1, 2, 3], "a": 1, "nested": {"foo": "bar"}} | 11861 | 11861 | </pre> | 11862 | 11862 | </div> | 11863 | 11863 | </div> | @@ -11897,7 +11897,7 @@ <h3 id="Decoding">Decoding<a class="anchor-link" href="#Decoding">¶</a></h3 | 11897 | 11897 |
| 11898 | 11898 |
| 11899 | 11899 | <div class="output_subarea output_stream output_stdout output_text"> | 11900 | | -<pre>type: <class 'dict'> data: {'a': 1, 'some_list': [1, 2, 3], 'b': True, 'c': None, 'nested': {'foo': 'bar'}} | | 11900 | +<pre>type: <class 'dict'> data: {'c': None, 'nested': {'foo': 'bar'}, 'b': True, 'some_list': [1, 2, 3], 'a': 1} | 11901 | 11901 | </pre> | 11902 | 11902 | </div> | 11903 | 11903 | </div> | @@ -11939,7 +11939,7 @@ <h3 id="MagicMock"><a href="https://docs.python.org/3/library/unittest.mock.html | 11939 | 11939 | <span class="bp">self</span><span class="o">.</span><span class="n">creds</span> <span class="o">=</span> <span class="p">(</span><span class="n">username</span><span class="p">,</span> <span class="n">password</span><span class="p">)</span> | 11940 | 11940 |
| 11941 | 11941 | <span class="k">def</span> <span class="nf">fetch_some_data</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> | 11942 | | - <span class="nb">print</span><span class="p">(</span><span class="s1">'Here we could for example fetch data from 3rd API and return the data.'</span><span class="p">)</span> | | 11942 | + <span class="nb">print</span><span class="p">(</span><span class="s1">'Here we could for example fetch data from 3rd party API and return the data.'</span><span class="p">)</span> | 11943 | 11943 | <span class="nb">print</span><span class="p">(</span><span class="s1">'Now we will just return some random number between 1-100.'</span><span class="p">)</span> | 11944 | 11944 | <span class="k">return</span> <span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span> | 11945 | 11945 |
| @@ -12066,7 +12066,7 @@ <h3 id="patch"><a href="https://docs.python.org/3/library/unittest.mock.html#uni | 12066 | 12066 | <span class="nb">print</span><span class="p">(</span><span class="s1">'All good, woop woop!'</span><span class="p">)</span> | 12067 | 12067 |
| 12068 | 12068 |
| 12069 | | -<span class="n">test_do_something_fancy</span><span class="p">()</span> <span class="c1"># This just for the sake of example</span> | | 12069 | +<span class="n">test_do_something_fancy</span><span class="p">()</span> <span class="c1"># This is just for the sake of example</span> | 12070 | 12070 | </pre></div> | 12071 | 12071 |
| 12072 | 12072 | </div> | @@ -12252,7 +12252,7 @@ <h3 id="defaultdict"><a href="https://docs.python.org/3/library/collections.html | 12252 | 12252 |
| 12253 | 12253 |
| 12254 | 12254 | <div class="output_subarea output_stream output_stdout output_text"> | 12255 | | -<pre>{'odd': [1, 3, 3, 5, 7], 'even': [2, 4, 2, 6]} | | 12255 | +<pre>{'even': [2, 4, 2, 6], 'odd': [1, 3, 3, 5, 7]} | 12256 | 12256 | </pre> | 12257 | 12257 | </div> | 12258 | 12258 | </div> | @@ -12300,7 +12300,7 @@ <h3 id="defaultdict"><a href="https://docs.python.org/3/library/collections.html | 12300 | 12300 |
| 12301 | 12301 |
| 12302 | 12302 | <div class="output_subarea output_stream output_stdout output_text"> | 12303 | | -<pre>defaultdict(<class 'list'>, {'odd': [1, 3, 3, 5, 7], 'even': [2, 4, 2, 6]}) | | 12303 | +<pre>defaultdict(<class 'list'>, {'even': [2, 4, 2, 6], 'odd': [1, 3, 3, 5, 7]}) | 12304 | 12304 | </pre> | 12305 | 12305 | </div> | 12306 | 12306 | </div> | @@ -12347,7 +12347,7 @@ <h3 id="defaultdict"><a href="https://docs.python.org/3/library/collections.html | 12347 | 12347 |
| 12348 | 12348 |
| 12349 | 12349 | <div class="output_subarea output_stream output_stdout output_text"> | 12350 | | -<pre>defaultdict(<class 'int'>, {'odd_count': 5, 'even_count': 4}) | | 12350 | +<pre>defaultdict(<class 'int'>, {'even_count': 4, 'odd_count': 5}) | 12351 | 12351 | </pre> | 12352 | 12352 | </div> | 12353 | 12353 | </div> | |
Collapse file Copy file name to clipboardExpand all lines: notebooks/intermediate/notebooks/std_lib2.ipynb +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 94 | 94 | " self.creds = (username, password)\n", | 95 | 95 | " \n", | 96 | 96 | " def fetch_some_data(self):\n", | 97 | | - " print('Here we could for example fetch data from 3rd API and return the data.')\n", | | 97 | + " print('Here we could for example fetch data from 3rd party API and return the data.')\n", | 98 | 98 | " print('Now we will just return some random number between 1-100.')\n", | 99 | 99 | " return random.randint(1, 100)\n", | 100 | 100 | "\n", | | 175 | 175 | " print('All good, woop woop!')\n", | 176 | 176 | " \n", | 177 | 177 | " \n", | 178 | | - "test_do_something_fancy() # This just for the sake of example" | | 178 | + "test_do_something_fancy() # This is just for the sake of example" | 179 | 179 | ] | 180 | 180 | }, | 181 | 181 | { | |
|