Browse Source

Imports

pull/187/head
Jure Šorn 10 months ago
parent
commit
d113a07390
2 changed files with 4 additions and 4 deletions
  1. 2
      README.md
  2. 6
      index.html

2
README.md

@ -816,7 +816,7 @@ player = Player(point, direction) # Returns its instance.
Imports Imports
------- -------
**Mechanism that makes code in one module available to another module.**
**Mechanism that makes code in one file available to another file.**
```python ```python
import <module> # Imports a built-in or '<module>.py'. import <module> # Imports a built-in or '<module>.py'.

6
index.html

@ -54,7 +54,7 @@
<body> <body>
<header> <header>
<aside>April 27, 2024</aside>
<aside>April 28, 2024</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a> <a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</header> </header>
@ -684,7 +684,7 @@ direction = Direction.N <span class="hljs-comment">#
Player = make_dataclass(<span class="hljs-string">'Player'</span>, [<span class="hljs-string">'loc'</span>, <span class="hljs-string">'dir'</span>]) <span class="hljs-comment"># Creates a class.</span> Player = make_dataclass(<span class="hljs-string">'Player'</span>, [<span class="hljs-string">'loc'</span>, <span class="hljs-string">'dir'</span>]) <span class="hljs-comment"># Creates a class.</span>
player = Player(point, direction) <span class="hljs-comment"># Returns its instance.</span> player = Player(point, direction) <span class="hljs-comment"># Returns its instance.</span>
</code></pre> </code></pre>
<div><h2 id="imports"><a href="#imports" name="imports">#</a>Imports</h2><p><strong>Mechanism that makes code in one module available to another module.</strong></p><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> &lt;module&gt; <span class="hljs-comment"># Imports a built-in or '&lt;module&gt;.py'.</span>
<div><h2 id="imports"><a href="#imports" name="imports">#</a>Imports</h2><p><strong>Mechanism that makes code in one file available to another file.</strong></p><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> &lt;module&gt; <span class="hljs-comment"># Imports a built-in or '&lt;module&gt;.py'.</span>
<span class="hljs-keyword">import</span> &lt;package&gt; <span class="hljs-comment"># Imports a built-in or '&lt;package&gt;/__init__.py'.</span> <span class="hljs-keyword">import</span> &lt;package&gt; <span class="hljs-comment"># Imports a built-in or '&lt;package&gt;/__init__.py'.</span>
<span class="hljs-keyword">import</span> &lt;package&gt;.&lt;module&gt; <span class="hljs-comment"># Imports a built-in or '&lt;package&gt;/&lt;module&gt;.py'.</span> <span class="hljs-keyword">import</span> &lt;package&gt;.&lt;module&gt; <span class="hljs-comment"># Imports a built-in or '&lt;package&gt;/&lt;module&gt;.py'.</span>
</code></pre></div> </code></pre></div>
@ -2934,7 +2934,7 @@ $ deactivate <span class="hljs-comment"># Deactivates the activ
<footer> <footer>
<aside>April 27, 2024</aside>
<aside>April 28, 2024</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a> <a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</footer> </footer>

Loading…
Cancel
Save