Skip to content

Commit 4752c24

Browse files
committed
Merge branch 'master' into pygame
2 parents b23a9d0 + a73ca6b commit 4752c24

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,12 +1390,12 @@ except <exception> as <name>:
13901390

13911391
### Exception Object
13921392
```python
1393-
arguments = <name>.args
1394-
exc_type = <name>.__class__
1395-
filename = <name>.__traceback__.tb_frame.f_code.co_filename
1396-
func_name = <name>.__traceback__.tb_frame.f_code.co_name
1397-
line = linecache.getline(filename, <name>.__traceback__.tb_lineno)
1398-
error_msg = traceback.format_exception(exc_type, <name>, <name>.__traceback__)
1393+
arguments = <name>.args
1394+
exc_type = <name>.__class__
1395+
filename = <name>.__traceback__.tb_frame.f_code.co_filename
1396+
func_name = <name>.__traceback__.tb_frame.f_code.co_name
1397+
line = linecache.getline(filename, <name>.__traceback__.tb_lineno)
1398+
error_msg = traceback.format_exception(exc_type, <name>, <name>.__traceback__)
13991399
```
14001400

14011401
### Built-in Exceptions
@@ -2007,6 +2007,7 @@ Memory View
20072007
<bin_file>.write(<mview>) # Writes mview to the binary file.
20082008
<bytes> = bytes(<mview>) # Creates a new bytes object.
20092009
<bytes> = <bytes>.join(<coll_of_mviews>) # Joins mviews using bytes object as sep.
2010+
<array> = array('<typecode>', <mview>) # Treats mview as a sequence of numbers.
20102011
<list> = list(<mview>) # Returns list of ints or floats.
20112012
<str> = str(<mview>, 'utf-8') # Treats mview as a bytes object.
20122013
<int> = int.from_bytes(<mview>, byteorder='big/little', signed=False)
@@ -2263,7 +2264,7 @@ Coroutines
22632264
* **Coroutine definition starts with `'async'` and its call with `'await'`.**
22642265
* **`'asyncio.run(<coroutine>)'` is the main entry point for asynchronous programs.**
22652266
* **Functions wait(), gather() and as_completed() can be used when multiple coroutines need to be started at the same time.**
2266-
* **Asyncio module also provides it's own [Queue](#queue), [Event](#semaphoreeventbarrier), [Lock](#lock) and [Semaphore](#semaphoreeventbarrier) classes.**
2267+
* **Asyncio module also provides its own [Queue](#queue), [Event](#semaphore-event-barrier), [Lock](#lock) and [Semaphore](#semaphore-event-barrier) classes.**
22672268

22682269
#### Runs a terminal game where you control an asterisk that must avoid numbers:
22692270

index.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,12 +1306,12 @@
13061306
<span class="hljs-keyword">raise</span>
13071307
</code></pre></div>
13081308

1309-
<div><h3 id="exceptionobject">Exception Object</h3><pre><code class="python language-python hljs">arguments = &lt;name&gt;.args
1310-
exc_type = &lt;name&gt;.__class__
1311-
filename = &lt;name&gt;.__traceback__.tb_frame.f_code.co_filename
1312-
func_name = &lt;name&gt;.__traceback__.tb_frame.f_code.co_name
1313-
line = linecache.getline(filename, &lt;name&gt;.__traceback__.tb_lineno)
1314-
error_msg = traceback.format_exception(exc_type, &lt;name&gt;, &lt;name&gt;.__traceback__)
1309+
<div><h3 id="exceptionobject">Exception Object</h3><pre><code class="python language-python hljs">arguments = &lt;name&gt;.args
1310+
exc_type = &lt;name&gt;.__class__
1311+
filename = &lt;name&gt;.__traceback__.tb_frame.f_code.co_filename
1312+
func_name = &lt;name&gt;.__traceback__.tb_frame.f_code.co_name
1313+
line = linecache.getline(filename, &lt;name&gt;.__traceback__.tb_lineno)
1314+
error_msg = traceback.format_exception(exc_type, &lt;name&gt;, &lt;name&gt;.__traceback__)
13151315
</code></pre></div>
13161316

13171317
<div><h3 id="builtinexceptions">Built-in Exceptions</h3><pre><code class="text language-text">BaseException
@@ -1778,6 +1778,7 @@
17781778
<div><h3 id="decode-2">Decode</h3><pre><code class="python language-python hljs">&lt;bin_file&gt;.write(&lt;mview&gt;) <span class="hljs-comment"># Writes mview to the binary file.</span>
17791779
&lt;bytes&gt; = bytes(&lt;mview&gt;) <span class="hljs-comment"># Creates a new bytes object.</span>
17801780
&lt;bytes&gt; = &lt;bytes&gt;.join(&lt;coll_of_mviews&gt;) <span class="hljs-comment"># Joins mviews using bytes object as sep.</span>
1781+
&lt;array&gt; = array(<span class="hljs-string">'&lt;typecode&gt;'</span>, &lt;mview&gt;) <span class="hljs-comment"># Treats mview as a sequence of numbers.</span>
17811782
&lt;list&gt; = list(&lt;mview&gt;) <span class="hljs-comment"># Returns list of ints or floats.</span>
17821783
&lt;str&gt; = str(&lt;mview&gt;, <span class="hljs-string">'utf-8'</span>) <span class="hljs-comment"># Treats mview as a bytes object.</span>
17831784
&lt;int&gt; = int.from_bytes(&lt;mview&gt;, byteorder=<span class="hljs-string">'big/little'</span>, signed=<span class="hljs-keyword">False</span>)
@@ -1963,7 +1964,7 @@
19631964
<li><strong>Coroutine definition starts with <code class="python hljs"><span class="hljs-string">'async'</span></code> and its call with <code class="python hljs"><span class="hljs-string">'await'</span></code>.</strong></li>
19641965
<li><strong><code class="python hljs"><span class="hljs-string">'asyncio.run(&lt;coroutine&gt;)'</span></code> is the main entry point for asynchronous programs.</strong></li>
19651966
<li><strong>Functions wait(), gather() and as_completed() can be used when multiple coroutines need to be started at the same time.</strong></li>
1966-
<li><strong>Asyncio module also provides it's own <a href="#queue">Queue</a>, <a href="#semaphoreeventbarrier">Event</a>, <a href="#lock">Lock</a> and <a href="#semaphoreeventbarrier">Semaphore</a> classes.</strong></li>
1967+
<li><strong>Asyncio module also provides its own <a href="#queue">Queue</a>, <a href="#semaphoreeventbarrier">Event</a>, <a href="#lock">Lock</a> and <a href="#semaphore-event-barrier">Semaphore</a> classes.</strong></li>
19671968
</ul><div><h4 id="runsaterminalgamewhereyoucontrolanasteriskthatmustavoidnumbers">Runs a terminal game where you control an asterisk that must avoid numbers:</h4><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> asyncio, collections, curses, enum, random
19681969

19691970
P = collections.namedtuple(<span class="hljs-string">'P'</span>, <span class="hljs-string">'x y'</span>) <span class="hljs-comment"># Position</span>

parse.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ function initDom(html) {
9090

9191
function getMd() {
9292
var readme = readFile('README.md');
93+
var readme = readme.replace("#semaphore-event-barrier", "#semaphoreeventbarrier");
9394
const converter = new showdown.Converter();
9495
return converter.makeHtml(readme);
9596
}

web/mario_bros.png

1.91 KB
Loading

web/sprite.png

7.12 KB
Loading

0 commit comments

Comments
 (0)