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
Copy file name to clipboardExpand all lines: README.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1293,7 +1293,7 @@ class MySequence:
1293
1293
```
1294
1294
1295
1295
#### Discrepancies between glossary definitions and abstract base classes:
1296
-
***Glossary defines iterable as any object with iter() or getitem() and sequence as any object with getitem() and len(). It does not define collection.**
1296
+
***Glossary on Python's website defines iterable as any object with iter() or getitem() and sequence as any object with getitem() and len(). It does not define collection.**
1297
1297
***Passing ABC Iterable to isinstance() or issubclass() checks whether object/class has method iter(), while ABC Collection checks for iter(), contains() and len().**
<div><h4id="discrepanciesbetweenglossarydefinitionsandabstractbaseclasses">Discrepancies between glossary definitions and abstract base classes:</h4><ul>
1101
-
<li><strong>Glossary defines iterable as any object with iter() or getitem() and sequence as any object with getitem() and len(). It does not define collection.</strong></li>
1101
+
<li><strong>Glossary on Python's website defines iterable as any object with iter() or getitem() and sequence as any object with getitem() and len(). It does not define collection.</strong></li>
1102
1102
<li><strong>Passing ABC Iterable to isinstance() or issubclass() checks whether object/class has method iter(), while ABC Collection checks for iter(), contains() and len().</strong></li>
lbs = value * factors[unit] / <spanclass="hljs-number">0.45359237</span>
2042
-
window[<spanclass="hljs-string">'-OUTPUT-'</span>].update(value=<spanclass="hljs-string">f'<spanclass="hljs-subst">{value}</span><spanclass="hljs-subst">{unit}</span> is <spanclass="hljs-subst">{lbs:g}</span> lbs.'</span>)
window[<spanclass="hljs-string">'-OUTPUT-'</span>].update(value=<spanclass="hljs-string">f'<spanclass="hljs-subst">{quantity}</span><spanclass="hljs-subst">{unit}</span> is <spanclass="hljs-subst">{lbs:g}</span> lbs.'</span>)
<list> = <WebDrv/El>.find_elements(<spanclass="hljs-string">'xpath'</span>, …) <spanclass="hljs-comment"># '//<tag>[@<attr>="<val>"]…'. See XPath.</span>
2070
+
<str> = <El>.get_attribute(<str>) <spanclass="hljs-comment"># Property if exists. Also <El>.text.</span>
2071
+
<El>.click/clear() <spanclass="hljs-comment"># Also <El>.send_keys(<str>).</span>
2072
2072
</code></pre></div>
2073
2073
2074
2074
2075
-
<div><h4id="xpathalsoavailableinlxmlscrapyandbrowsersconsoleviadxxpath">XPath — also available in lxml, Scrapy, and browser's console via <codeclass="python hljs"><spanclass="hljs-string">'$x("<xpath>")'</span></code>:</h4><pre><codeclass="python language-python hljs"><xpath> = //<element>[/ <spanclass="hljs-keyword">or</span> // <element>] <spanclass="hljs-comment"># /<child>, //<descendant>, /../<siblng></span>
2076
-
<xpath> = //<element>/following::<element> <spanclass="hljs-comment"># Next element. Also preceding/parent/…</span>
<condition> = [<sub_cond> [<spanclass="hljs-keyword">and</span>/<spanclass="hljs-keyword">or</span> <sub_cond>]] <spanclass="hljs-comment"># For negation use `not(<sub_cond>)`.</span>
2079
-
<sub_cond> = @<attr>[=<spanclass="hljs-string">"<val>"</span>] <spanclass="hljs-comment"># `text()=`, `.=` match (complete) text.</span>
2080
-
<sub_cond> = contains(@<attr>, <spanclass="hljs-string">"<val>"</span>) <spanclass="hljs-comment"># Is <val> a substring of attr's value?</span>
2081
-
<sub_cond> = [//]<element> <spanclass="hljs-comment"># Has matching child? Descendant if //.</span>
2075
+
<div><h4id="xpathalsoavailableinlxmlscrapyandbrowsersconsoleviadxxpath">XPath — also available in lxml, Scrapy, and browser's console via <codeclass="python hljs"><spanclass="hljs-string">'$x("<xpath>")'</span></code>:</h4><pre><codeclass="python language-python hljs"><xpath> = //<element>[/ <spanclass="hljs-keyword">or</span> // <element>] <spanclass="hljs-comment"># /<child>, //<descendant>, /../<sibling></span>
2076
+
<xpath> = //<element>/following::<element> <spanclass="hljs-comment"># Next element. Also preceding/parent/…</span>
<condition> = [<sub_cond> [<spanclass="hljs-keyword">and</span>/<spanclass="hljs-keyword">or</span> <sub_cond>]] <spanclass="hljs-comment"># For negation use `not(<sub_cond>)`.</span>
2079
+
<sub_cond> = @<attr>[=<spanclass="hljs-string">"<val>"</span>] <spanclass="hljs-comment"># `text()=`, `.=` match (complete) text.</span>
2080
+
<sub_cond> = contains(@<attr>, <spanclass="hljs-string">"<val>"</span>) <spanclass="hljs-comment"># Is <val> a substring of attr's value?</span>
2081
+
<sub_cond> = [//]<element> <spanclass="hljs-comment"># Has matching child? Descendant if //.</span>
2082
2082
</code></pre></div>
2083
2083
2084
-
<div><h2id="web"><ahref="#web" name="web">#</a>Web</h2><p><strong>Flask is a micro web framework/server. If you just want to open a html file in a web browser use <codeclass="python hljs"><spanclass="hljs-string">'webbrowser.open(<path>)'</span></code> instead.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install flask</span>
2084
+
<div><h2id="webapp"><ahref="#webapp" name="webapp">#</a>Web App</h2><p><strong>Flask is a micro web framework/server. If you just want to open a html file in a web browser use <codeclass="python hljs"><spanclass="hljs-string">'webbrowser.open(<path>)'</span></code> instead.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install flask</span>
0 commit comments