So I'm going into total nit-picking territory here, but since I'm looking
at it and I think the series needs a respin anyway...

On Wed, 31 Aug 2016 17:29:31 +0200
Markus Heiser <markus.hei...@darmarit.de> wrote:

> +        m = c_funcptr_sig_re.match(sig)
> +        if m is None:
> +            m = c_sig_re.match(sig)
> +        if m is None:
> +            raise ValueError('no match')

How about we put that second test inside the first if block and avoid the
redundant None test if the first match works?  The energy saved may
prevent a hurricane someday :)

> +
> +        rettype, fullname, arglist, _const = m.groups()
> +        if rettype or not arglist.strip():
> +            return False
> +
> +        arglist = arglist.replace('`', '').replace('\\ ', '').strip()  # 
> remove markup
> +        arglist = [a.strip() for a in arglist.split(",")]

Similarly, stripping the args three times seems a bit much.  The middle
one is totally redundant and could go at a minimum.

Thanks,

jon
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to