On Sun, 14 Jan 2018, SF Markus Elfring wrote:

> >> 4. Is is more efficient to use the Python key word “in” to look for
> >>    a short string instead of fiddling with the programming interface
> >>    for regular expressions?
> >
> > If you test it and find that it is significantly more efficient,
> > then please send a patch accordingly.
>
> Should the support for a specific key word in this programming language
> be generally faster or just more direct than invoking a component
> from another software library?
>
> Do we need to start an official benchmarking session to achieve
> another decision in any software design direction?

I have no idea about python.  If you find a performance improvement, send
a patch,  If you don't find a performance improvement, I don't care about
the issue.  In any case, the ball is entirely in your court.  There is no
"we".


>
>
> >> 5. Please omit the variable “msg” in the last SmPL rule.
> >>    The need data can be passed directly instead.
> >
> > The use of the msg variable is common in the semantic patches in the kernel.
>
> Can this implementation detail be adjusted?
>
>
> > Ampng other things it increases the chance that the line will fit
> > in 80 characters.  It is not completely a success here, but at least it is
> > more of a success than it would be otherwise.
>
> Such data can also be passed as function parameters (in a scripting language)
> without storing them into variables before in some use cases.

But then, if a pleasant indentation scheme is followed, the very long
string will be further to the right and will even more exceed the 80
column boundary.  If python is so sensitive that it cares about the
introduction of a variable that is only used immediately afterwards, then
it would seem that the problem is with python.

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to