On Thursday 30 September 2010, you wrote:
> Hello Panos,
>
> We can also have a solution for this omitting the args, as taking
> args[-1] is not feasible it can crash the system or it can also give
> false result too for e.g. if the last argument is a dictionary but not
> context . So I have a better solution for translate._() method. Please
> check the attached patch and give your views.
>
> Thanks.
>
> ** Patch added: "translate_patch.diff"
>
> https://bugs.launchpad.net/openobject-server/+bug/487251/+attachment/16564
> 80/+files/translate_patch.diff
Please remember that the _() must be a fast function, may be called much more
often than we really want it (because of bad code, in fact). So it is
important to keep the code as simple (and "cheap") as possible. Every stack
frame we open, every loop or variable instantiation will add some "weight" to
the function, which we should ideally avoid.
On Thursday 30 September 2010, you wrote: patch.diff" /bugs.launchpad .net/openobject -server/ +bug/487251/ +attachment/ 16564 translate_ patch.diff
> Hello Panos,
>
> We can also have a solution for this omitting the args, as taking
> args[-1] is not feasible it can crash the system or it can also give
> false result too for e.g. if the last argument is a dictionary but not
> context . So I have a better solution for translate._() method. Please
> check the attached patch and give your views.
>
> Thanks.
>
> ** Patch added: "translate_
>
> https:/
> 80/+files/
Please remember that the _() must be a fast function, may be called much more
often than we really want it (because of bad code, in fact). So it is
important to keep the code as simple (and "cheap") as possible. Every stack
frame we open, every loop or variable instantiation will add some "weight" to
the function, which we should ideally avoid.