Only thing that comes to my mind is that you can´t rename a variable. With dict() method you can "rename" them. I don´t know if people do that.

Traditional way, if you want to rename variable:
total_exposure_at_day_light_time = 365
return dict(teadlt = total_exposure_at_day_light_time)

new way:
total_exposure_at_day_light_time = 365
teadlt = total_exposure_at_day_light_time

return locals()

you double the memory usage of variables.

Kenneth

It's interesting, while I usually don't use so many variables in each controller.



2011/1/14 Bob <[email protected] <mailto:[email protected]>>

    I see no downsides and seems that Massimo confirmed that. I already
    tried using return locals() and it works without issues.

    On 14 Ян, 07:37, pbreit <[email protected]
    <mailto:[email protected]>> wrote:
    > Wait, so are you saying that instead of return dict(items=items,
    blah=blah,
    > etc) we can just use return locals() on most or all controllers?
    What's the
    > downside, memory? Implicitness?




--
Atenciosamente


Alexandre Andrade
Hipercenter.com Classificados Gratuitos e Inteligentes

Reply via email to