[openstack-dev] Use of local()

Davanum Srinivas davanum at gmail.com
Fri Feb 8 13:01:22 UTC 2013


+1. I can take a stab at it

-- dims

On Fri, Feb 8, 2013 at 7:03 AM, Sean Dague <sdague at linux.vnet.ibm.com> wrote:
> On 02/08/2013 05:16 AM, Thierry Carrez wrote:
>>
>> Jay Pipes wrote:
>>>
>>> On 02/07/2013 09:58 PM, Sean Dague wrote:
>>>>
>>>> On 02/07/2013 06:04 PM, Nachi Ueno wrote:
>>>>>>
>>>>>> I suspect we should just slowly transition as people touch code.
>>>>>
>>>>>
>>>>> I agree. The reason why I asked this is for reviewing.
>>>>> so I'll comment not to use local() in review.
>>>>
>>>>
>>>> If we have rough concensus start with updating HACKING in the relevant
>>>> projects. Then I suggest a grind through replacing the code. Once it's
>>>> out we can enforce it in hacking.py (comming soon to a project near you,
>>>> and not just in nova and tempest).
>>>
>>>
>>> Go for it. Jason's suggestion for allowing LOG.debug() et al messages to
>>> allow kwargs would make things much more readable than supplying huge
>>> manually-coded dicts.
>>
>>
>> If consensus is that Jason's suggestion is the right mix between
>> readability and length, maybe we should wait for oslo-logging to support
>> kwargs, rather than start fixing locals() now and be left with a mix of
>> various solutions (% {}, % dict(), kwargs and locals()).
>>
>> I'd prefer to have one true recommended solution to replace the
>> confusing one, rather than just say the confusing one is now officially
>> bad practice, and let people go wild with various solutions.
>
>
> +1.
>
> Volunteers to enhance oslo?
>
>         -Sean
>
>
> --
> Sean Dague
> IBM Linux Technology Center
> email: sdague at linux.vnet.ibm.com
> alt-email: sldague at us.ibm.com
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



-- 
Davanum Srinivas :: http://davanum.wordpress.com



More information about the OpenStack-dev mailing list