[openstack-dev] [solum] pep8 - splitting expressions

Gilbert Pilz gilbert.pilz at oracle.com
Tue Sep 9 19:05:32 UTC 2014


I have a question with regards to splitting expressions in order to conform to the pep8 line-length restriction. I have the following bit of code:

            res = amodel.Assemblies(uri=common.ASSEM_URI_STR %
                                    pecan.request.host_url,
                                    name='Solum_CAMP_assemblies',
                                    type='assemblies',
                                    description=common.ASSEM_DESC_STR,
                                    assembly_links=a_links,
                                    parameter_definitions_uri=common.ASSEM_PARAM_STR %
                                    pecan.request.host_url)

The line that assigns a value to 'parameter_definitions_uri' is (as you might be able to tell) too long. What is the best way to split this expression up?

~ gp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140909/9ecbc04c/attachment.html>


More information about the OpenStack-dev mailing list