Repo Added
|
Files
160
|
Badge
Embed ▾
README BADGES
|
push
travis-ci
<a href="https://github.com/pfalcon/pycopy/commit/<a class=hub.com/pfalcon/pycopy/commit/<a class="double-link" href="https://git"><a class=hub.com/pfalcon/pycopy/commit/<a class="double-link" href="https://git"><a class=hub.com/pfalcon/pycopy/commit/<a class="double-link" href="https://git"><a class=hub.com/pfalcon/pycopy/commit/<a class="double-link" href="https://git"><a class=hub.com/pfalcon/pycopy/commit/4b149fb8a4fb18e954ba7113d1495ccf822e394f">4b149fb8a"><a href="https://github.com/pfalcon/pycopy/commit/</a><a class="double-link" href="https://github.com/pfalcon/pycopy/commit/<a class="double-link" href="https://git"><a class=</a>hub.com/pfalcon/pycopy/commit/<a class="double-link" href="https://git"><a class=</a>hub.com/pfalcon/pycopy/commit/<a class="double-link" href="https://git"><a class=</a>hub.com/pfalcon/pycopy/commit/4b149fb8a4fb18e954ba7113d1495ccf822e394f">4b149fb8a</a><a href="https://github.com/pfalcon/pycopy/commit/4b149fb8a4fb18e954ba7113d1495ccf822e394f">">&lt;a href=&quot;https://github.com/pfalcon/pycopy/commit/</a><a class="double-link" href="https://github.com/pfalcon/pycopy/commit/&lt;a class=&quot;double-link&quot; href=&quot;https://git">&lt;a class=</a>hub.com/pfalcon/pycopy/commit/4b149fb8a4fb18e954ba7113d1495ccf822e394f">4b149fb8a</a><a href="https://github.com/pfalcon/pycopy/commit/4b149fb8a4fb18e954ba7113d1495ccf822e394f">&lt;a href=&quot;https://github.com/pfalcon/pycopy/commit/4b149fb8a4fb18e954ba7113d1495ccf822e394f&quot;&gt;&amp;quot;&amp;gt;py/objstringio: Add += operator for BytesIO/StringIO. There&amp;amp;#39;s a common anti-pattern of using a string as an accumulating string buffer, e.g.: buf = &amp;amp;quot;&amp;amp;quot; while ...: buf += &amp;amp;quot;something&amp;amp;quot; use(buf) This is highly inefficient. The right pattern is to use StringIO, but this requires rewriting code to use .write() method: buf = StringIO() while ...: buf.write(&amp;amp;quot;something&amp;amp;quot;) use(buf.getvalue()) Instead, by introducing implementation of __iadd__ (+=) method, effectively making it an alias for .write(), it allows for very clear and co... (continued)
0 of 0 relevant lines covered (NaN%)
0.0 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|
Builds | Branch | Commit | Type | Ran | Committer | Via | Coverage |
---|---|---|---|---|---|---|---|
2089 | stringio-iadd | <a href="https://github.com/pfalcon/pycopy/commit/4b149fb8a"><a href="https://github.com/pfalcon/pycopy/commit/</a><a class="double-link" href="https://github.com/pfalcon/pycopy/commit/<a class="doubl... | push | pfalcon | travis-ci | pending completion |