Browse Source

Operator

pull/115/head
Jure Šorn 3 years ago
parent
commit
47b4c77df7
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -2147,7 +2147,7 @@ union_of_sets = functools.reduce(op.or_, <coll_of_sets>)
last_element = op.methodcaller('pop')(<list>)
```
* **Functions and\_() and or\_() correspond to operators '&' and '|'.**
* **They only work on objects with defined and() and or() special methods, ie. ints and sets.**
* **They only work on objects with defined and() and or() special methods, i.e. ints and sets.**
Introspection

2
index.html

@ -1920,7 +1920,7 @@ last_element = op.methodcaller(<span class="hljs-string">'pop'</span>)(&lt;l
</code></pre>
<ul>
<li><strong>Functions and_() and or_() correspond to operators '&amp;' and '|'.</strong></li>
<li><strong>They only work on objects with defined and() and or() special methods, ie. ints and sets.</strong></li>
<li><strong>They only work on objects with defined and() and or() special methods, i.e. ints and sets.</strong></li>
</ul>
<div><h2 id="introspection"><a href="#introspection" name="introspection">#</a>Introspection</h2><p><strong>Inspecting code at runtime.</strong></p><div><h3 id="variables">Variables</h3><pre><code class="python language-python hljs">&lt;list&gt; = dir() <span class="hljs-comment"># Names of local variables (incl. functions).</span>
&lt;dict&gt; = vars() <span class="hljs-comment"># Dict of local variables. Also locals().</span>

Loading…
Cancel
Save