2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-26 18:52:26 +00:00

more minor tweaks

[SVN r15843]
This commit is contained in:
Joel de Guzman
2002-10-10 07:27:10 +00:00
parent df8c8f025c
commit 7d9770762c

View File

@@ -43,7 +43,7 @@ the construct:</p>
</span><span class=special>;
</span></pre></code>
<p>
can be used to expose it Python. The new enum type is created in the
can be used to expose to Python. The new enum type is created in the
current <tt>scope()</tt>, which is usually the current module. The snippet above
creates a Python class derived from Python's <tt>int</tt> type which is
associated with the C++ type passed as its first parameter.</p>
@@ -54,7 +54,7 @@ associated with the C++ type passed as its first parameter.</p>
associated global Python object which controls the Python namespace in
which new extension classes and wrapped functions will be defined as
attributes. Details can be found <a href="../../v2/scope.html">
here</a> </td>
here</a>. </td>
</tr>
</table>
<p>
@@ -64,8 +64,8 @@ You can access those values in Python as</p>
</span><span class=identifier>my_module</span><span class=special>.</span><span class=identifier>choice</span><span class=special>.</span><span class=identifier>red
</span></pre></code>
<p>
where my_module is the module where the enum is declared. You can create a
new scope around a class:</p>
where my_module is the module where the enum is declared. You can also
create a new scope around a class:</p>
<code><pre>
<span class=identifier>scope </span><span class=identifier>in_X</span><span class=special>(</span><span class=identifier>class_</span><span class=special>&lt;</span><span class=identifier>X</span><span class=special>&gt;(</span><span class=string>&quot;X&quot;</span><span class=special>)
</span><span class=special>.</span><span class=identifier>def</span><span class=special>( </span><span class=special>... </span><span class=special>)