On Mon, Nov 18, 2013 at 8:23 PM, Vishvananda Ishaya <vishvana...@gmail.com>wrote: > > > +1 to sticking something in hacking. FWIW I would probably do the following > to avoid the debate altogether: > > result = self._path_file_exists(ds_browser, folder_path, file_name) > folder_exists, file_exists, file_size_in_kb, disk_extents = result > > Vish > > 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:
mismatches_description = textwrap.dedent("""\ expected = <test xmlns="http://docs.openstack.org/identity/api/v2.0 "> <success/> </test> actual = <test xmlns="http://docs.openstack.org/identity/api/v2.0"> <nope_it_fails/> </test> """) 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: mismatches_description = textwrap.dedent(""" expected = <test xmlns="http://docs.openstack.org/identity/api/v2.0 "> <success/> </test> actual = <test xmlns="http://docs.openstack.org/identity/api/v2.0"> <nope_it_fails/> </test> """).lstrip() Would this use be forbidden too? -- David blog: http://www.traceback.org twitter: http://twitter.com/dstanek www: http://dstanek.com
_______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev