<div dir="ltr"><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 18, 2013 at 8:23 PM, Vishvananda Ishaya <span dir="ltr"><<a href="mailto:vishvananda@gmail.com" target="_blank">vishvananda@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">
<br>
</div>+1 to sticking something in hacking. FWIW I would probably do the following<br>
to avoid the debate altogether:<br>
<br>
result = self._path_file_exists(ds_browser, folder_path, file_name)<br>
folder_exists, file_exists, file_size_in_kb, disk_extents = result<br>
<br>
Vish<br>
<div class=""><div class="h5"><br></div></div></blockquote></div><div><br></div><div>I'm working on some test code and came up with what I think is a valid use of a line ending in \.  I'm not escaping the newline from a Python syntax point of view.  I'm doing in inside of a string literal.  Example:<div>
<br></div><div><div>    mismatches_description = textwrap.dedent("""\</div><div>        expected = <test xmlns="<a href="http://docs.openstack.org/identity/api/v2.0">http://docs.openstack.org/identity/api/v2.0</a>"></div>
<div>          <success/></div><div>        </test></div><div><br></div><div>        actual = <test xmlns="<a href="http://docs.openstack.org/identity/api/v2.0">http://docs.openstack.org/identity/api/v2.0</a>"></div>
<div>          <nope_it_fails/></div><div>        </test></div><div>    """)</div></div><div><br></div><div>This can be written in several different ways, but I think that none of them is as clear as the trailing slash.  This is, I think, the clearest alternative example:</div>
<div><br></div><div><div>    mismatches_description = textwrap.dedent("""</div><div>        expected = <test xmlns="<a href="http://docs.openstack.org/identity/api/v2.0">http://docs.openstack.org/identity/api/v2.0</a>"></div>
<div>          <success/></div><div>        </test></div><div><br></div><div>        actual = <test xmlns="<a href="http://docs.openstack.org/identity/api/v2.0">http://docs.openstack.org/identity/api/v2.0</a>"></div>
<div>          <nope_it_fails/></div><div>        </test></div><div>    """).lstrip()</div></div><div><br></div><div>Would this use be forbidden too?</div></div><div><br></div>-- <br>David<br>blog: <a href="http://www.traceback.org" target="_blank">http://www.traceback.org</a><br>
twitter: <a href="http://twitter.com/dstanek" target="_blank">http://twitter.com/dstanek</a><div>www: <a href="http://dstanek.com" target="_blank">http://dstanek.com</a></div>
</div></div>