You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<title>1. Introduction: abstraction in mathematics and programming — Object oriented programming in Python for mathematicians 2021.0 documentation</title>
<linkrel="next" title="3. Objects and abstraction" href="3_objects.html" />
@@ -106,7 +105,7 @@ <h2><span class="section-number">2.1. </span>Setting up a Python environment for
106
105
<h2><spanclass="section-number">2.2. </span>Installing Python packages<aclass="headerlink" href="#installing-python-packages" title="Permalink to this headline">¶</a></h2>
107
106
<p>Suppose we’ve created and activated a venv, and now there’s a Python
108
107
package we’d like to have access to. Installation of Python packages
109
-
is handled by <aclass="reference external" href="https://pip.pypa.io/en/stable/" title="(in pip v21.0)"><span>pip - The Python Package Installer</span></a>. Pip has many usage options, which
108
+
is handled by <aclass="reference external" href="https://pip.pypa.io/en/stable/" title="(in pip v21.1)"><span>pip</span></a>. Pip has many usage options, which
110
109
enable a large number of different installation
111
110
configurations. However, for most users most of the time, a few simple
112
111
pip commands suffice. As with <aclass="reference internal" href="#term-venv"><spanclass="xref std std-term">venv</span></a> creation, package
the practical details of including tests in your code here.</p>
651
650
<p>There are a number of Python packages which support code testing. The
652
651
concepts are largely similar so rather than get bogged down in the
653
-
details of multiple frameworks, we will introduce <aclass="reference external" href="https://docs.pytest.org/en/latest/index.html" title="(in pytest v0.1.dev249+g35df3e6)"><spanclass="xref std std-doc">pytest</span></a>, which is one of the most widely used. Pytest is simply a Python
652
+
details of multiple frameworks, we will introduce <aclass="reference external" href="https://docs.pytest.org/en/latest/index.html" title="(in pytest v6.3.0.dev369+gc198a7a67)"><spanclass="xref std std-doc">pytest</span></a>, which is one of the most widely used. Pytest is simply a Python
654
653
package, so you can install it into your current environment using:</p>
@@ -819,24 +818,24 @@ <h2><span class="section-number">2.8. </span>Writing code to a specified interfa
819
818
<h2><spanclass="section-number">2.9. </span>Glossary<aclass="headerlink" href="#glossary" title="Permalink to this headline">¶</a></h2>
820
819
<blockquote>
821
820
<div><dlclass="glossary simple">
822
-
<dtid="term-module">module</dt><dd><p>A text file containing Python code which is accessed using the <aclass="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#import" title="(in Python v3.9)"><spanclass="xref std std-ref">import statement</span></a>.</p>
821
+
<dtid="term-module">module<aclass="headerlink" href="#term-module" title="Permalink to this term">¶</a></dt><dd><p>A text file containing Python code which is accessed using the <aclass="reference external" href="https://docs.python.org/3/reference/simple_stmts.html#import" title="(in Python v3.9)"><spanclass="xref std std-ref">import statement</span></a>.</p>
823
822
</dd>
824
-
<dtid="term-namespace">namespace</dt><dd><p>A collection of names. Within a single namespace, each
823
+
<dtid="term-namespace">namespace<aclass="headerlink" href="#term-namespace" title="Permalink to this term">¶</a></dt><dd><p>A collection of names. Within a single namespace, each
825
824
name has a single defined meaning. Names in different spaces
826
825
can be referred to using the syntax <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">namespace.name</span></code> where
827
826
<codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">namespace</span></code> is an name for the namespace. namespaces are
828
827
themselves named, so they can be nested (<codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">namespace.inner_namespace.name</span></code>).</p>
829
828
</dd>
830
-
<dtid="term-package">package</dt><dd><p>A grouping of related <aclass="reference internal" href="#term-module"><spanclass="xref std std-term">modules</span></a> into a single importable unit.</p>
829
+
<dtid="term-package">package<aclass="headerlink" href="#term-package" title="Permalink to this term">¶</a></dt><dd><p>A grouping of related <aclass="reference internal" href="#term-module"><spanclass="xref std std-term">modules</span></a> into a single importable unit.</p>
831
830
</dd>
832
-
<dtid="term-Python-interpreter">Python interpreter</dt><dd><p>The piece of software which interprets and executes Python commands.</p>
831
+
<dtid="term-Python-interpreter">Python interpreter<aclass="headerlink" href="#term-Python-interpreter" title="Permalink to this term">¶</a></dt><dd><p>The piece of software which interprets and executes Python commands.</p>
833
832
</dd>
834
-
<dtid="term-scope">scope</dt><dd><p>The scope of a name is the section of code for which that name is valid.</p>
833
+
<dtid="term-scope">scope<aclass="headerlink" href="#term-scope" title="Permalink to this term">¶</a></dt><dd><p>The scope of a name is the section of code for which that name is valid.</p>
835
834
</dd>
836
-
<dtid="term-script">script</dt><dtid="term-program">program</dt><dd><p>A text file containing a sequence of Python statements to be
835
+
<dtid="term-script">script<aclass="headerlink" href="#term-script" title="Permalink to this term">¶</a></dt><dtid="term-program">program<aclass="headerlink" href="#term-program" title="Permalink to this term">¶</a></dt><dd><p>A text file containing a sequence of Python statements to be
837
836
executed. In Python, program and script are synonymous.</p>
838
837
</dd>
839
-
<dtid="term-venv">venv</dt><dtid="term-virtual-environment">virtual environment</dt><dd><p>A lightweight private Python installation with its own set of
838
+
<dtid="term-venv">venv<aclass="headerlink" href="#term-venv" title="Permalink to this term">¶</a></dt><dtid="term-virtual-environment">virtual environment<aclass="headerlink" href="#term-virtual-environment" title="Permalink to this term">¶</a></dt><dd><p>A lightweight private Python installation with its own set of
840
839
Python packages installed.</p>
841
840
</dd>
842
841
</dl>
@@ -969,7 +968,7 @@ <h2><span class="section-number">2.10. </span>Exercises<a class="headerlink" hre
969
968
</div>
970
969
<divclass="footer" role="contentinfo">
971
970
© Copyright 2019-2021, David A. Ham.
972
-
Created using <ahref="https://www.sphinx-doc.org/">Sphinx</a>3.4.3.
971
+
Created using <ahref="https://www.sphinx-doc.org/">Sphinx</a>4.1.0.
0 commit comments