Skip to content

Commit f3157fe

Browse files
committed
Type
1 parent 6d5dfc6 commit f3157fe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1745,7 +1745,7 @@ Metaprograming
17451745
**Code that generates code.**
17461746

17471747
### Type
1748-
**Type is the root class. If only passed the object it returns its type (class). Otherwise it creates a new class.**
1748+
**Type is the root class. If only passed an object it returns its type (class). Otherwise it creates a new class.**
17491749

17501750
```python
17511751
<class> = type(<class_name>, <parents_tuple>, <attributes_dict>)

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,7 @@ <h3 id="parameters">Parameters</h3>
15071507
<h2 id="metaprograming"><a href="#metaprograming" name="metaprograming">#</a>Metaprograming</h2>
15081508
<p><strong>Code that generates code.</strong></p>
15091509
<h3 id="type-1">Type</h3>
1510-
<p><strong>Type is the root class. If only passed the object it returns its type (class). Otherwise it creates a new class.</strong></p>
1510+
<p><strong>Type is the root class. If only passed an object it returns its type (class). Otherwise it creates a new class.</strong></p>
15111511
<pre><code class="python language-python hljs">&lt;<span class="hljs-class"><span class="hljs-keyword">class</span>&gt; = <span class="hljs-title">type</span><span class="hljs-params">(&lt;class_name&gt;, &lt;parents_tuple&gt;, &lt;attributes_dict&gt;)</span>
15121512
</span></code></pre>
15131513
<pre><code class="python language-python hljs"><span class="hljs-meta">&gt;&gt;&gt; </span>Z = type(<span class="hljs-string">'Z'</span>, (), {<span class="hljs-string">'a'</span>: <span class="hljs-string">'abcde'</span>, <span class="hljs-string">'b'</span>: <span class="hljs-number">12345</span>})

0 commit comments

Comments
 (0)