Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef79bdf

Browse files
committed
Csv, Introspection
1 parent f7f20bb commit ef79bdf

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,7 @@ import csv
18291829
* **`'delimiter'` - A one-character string used to separate fields.**
18301830
* **`'quotechar'` - Character for quoting fields that contain special characters.**
18311831
* **`'doublequote'` - Whether quotechars inside fields are/get doubled or escaped.**
1832-
* **`'skipinitialspace'` - Whether whitespace after delimiter gets stripped by reader.**
1832+
* **`'skipinitialspace'` - Is space character at the start of the field stripped by reader.**
18331833
* **`'lineterminator'` - How writer terminates rows. Reader is hardcoded to '\n', '\r', '\r\n'.**
18341834
* **`'quoting'` - 0: As necessary, 1: All, 2: All but numbers which are read as floats, 3: None.**
18351835
* **`'escapechar'` - Character for escaping quotechars if doublequote is False.**
@@ -2192,11 +2192,11 @@ delattr(<object>, '<attr_name>') # Same. Also `del <object>.<attr_name
21922192

21932193
### Parameters
21942194
```python
2195-
from inspect import signature
2196-
<Sig> = signature(<function>) # Function's Signature object.
2197-
<dict> = <Sig>.parameters # Dict of function's Parameter objects.
2198-
<str> = <Param>.name # Parameter's name.
2195+
<Sig> = inspect.signature(<function>) # Function's Signature object.
2196+
<dict> = <Sig>.parameters # Dict of Parameter objects.
21992197
<memb> = <Param>.kind # Member of ParameterKind enum.
2198+
<obj> = <Param>.default # Default value or <Param>.empty.
2199+
<type> = <Param>.annotation # Type or <Param>.empty.
22002200
```
22012201

22022202

index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
<body>
5656
<header>
57-
<aside>July 26, 2022</aside>
57+
<aside>July 27, 2022</aside>
5858
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
5959
</header>
6060

@@ -1528,7 +1528,7 @@
15281528
<li><strong><code class="python hljs"><span class="hljs-string">'delimiter'</span></code> - A one-character string used to separate fields.</strong></li>
15291529
<li><strong><code class="python hljs"><span class="hljs-string">'quotechar'</span></code> - Character for quoting fields that contain special characters.</strong></li>
15301530
<li><strong><code class="python hljs"><span class="hljs-string">'doublequote'</span></code> - Whether quotechars inside fields are/get doubled or escaped.</strong></li>
1531-
<li><strong><code class="python hljs"><span class="hljs-string">'skipinitialspace'</span></code> - Whether whitespace after delimiter gets stripped by reader.</strong></li>
1531+
<li><strong><code class="python hljs"><span class="hljs-string">'skipinitialspace'</span></code> - Is space character at the start of the field stripped by reader.</strong></li>
15321532
<li><strong><code class="python hljs"><span class="hljs-string">'lineterminator'</span></code> - How writer terminates rows. Reader is hardcoded to '\n', '\r', '\r\n'.</strong></li>
15331533
<li><strong><code class="python hljs"><span class="hljs-string">'quoting'</span></code> - 0: As necessary, 1: All, 2: All but numbers which are read as floats, 3: None.</strong></li>
15341534
<li><strong><code class="python hljs"><span class="hljs-string">'escapechar'</span></code> - Character for escaping quotechars if doublequote is False.</strong></li>
@@ -1810,11 +1810,11 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
18101810
delattr(&lt;object&gt;, <span class="hljs-string">'&lt;attr_name&gt;'</span>) <span class="hljs-comment"># Same. Also `del &lt;object&gt;.&lt;attr_name&gt;`.</span>
18111811
</code></pre></div>
18121812

1813-
<div><h3 id="parameters-1">Parameters</h3><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> inspect <span class="hljs-keyword">import</span> signature
1814-
&lt;Sig&gt; = signature(&lt;function&gt;) <span class="hljs-comment"># Function's Signature object.</span>
1815-
&lt;dict&gt; = &lt;Sig&gt;.parameters <span class="hljs-comment"># Dict of function's Parameter objects.</span>
1816-
&lt;str&gt; = &lt;Param&gt;.name <span class="hljs-comment"># Parameter's name.</span>
1813+
<div><h3 id="parameters-1">Parameters</h3><pre><code class="python language-python hljs">&lt;Sig&gt; = inspect.signature(&lt;function&gt;) <span class="hljs-comment"># Function's Signature object.</span>
1814+
&lt;dict&gt; = &lt;Sig&gt;.parameters <span class="hljs-comment"># Dict of Parameter objects.</span>
18171815
&lt;memb&gt; = &lt;Param&gt;.kind <span class="hljs-comment"># Member of ParameterKind enum.</span>
1816+
&lt;obj&gt; = &lt;Param&gt;.default <span class="hljs-comment"># Default value or &lt;Param&gt;.empty.</span>
1817+
&lt;type&gt; = &lt;Param&gt;.annotation <span class="hljs-comment"># Type or &lt;Param&gt;.empty.</span>
18181818
</code></pre></div>
18191819

18201820
<div><h2 id="metaprogramming"><a href="#metaprogramming" name="metaprogramming">#</a>Metaprogramming</h2><p><strong>Code that generates code.</strong></p><div><h3 id="type-1">Type</h3><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><pre><code class="python language-python hljs">&lt;class&gt; = type(<span class="hljs-string">'&lt;class_name&gt;'</span>, &lt;tuple_of_parents&gt;, &lt;dict_of_class_attributes&gt;)</code></pre></div></div>
@@ -2905,7 +2905,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
29052905

29062906

29072907
<footer>
2908-
<aside>July 26, 2022</aside>
2908+
<aside>July 27, 2022</aside>
29092909
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
29102910
</footer>
29112911

0 commit comments

Comments
 (0)