[Mesa-dev] [PATCH 33/41] glapi: glX_proto_common.py: use python's _ for unused values

Ian Romanick idr at freedesktop.org
Tue Apr 19 23:31:48 UTC 2016


Heh... I don't think _ was a thing when I first wrote this.  I like it.
 This patch is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 03/31/2016 05:04 PM, Dylan Baker wrote:
> Rather than using a variable called junk, use _ for unused unpacked
> values. This is much more idiomatic.
> 
> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
>  src/mapi/glapi/gen/glX_proto_common.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mapi/glapi/gen/glX_proto_common.py b/src/mapi/glapi/gen/glX_proto_common.py
> index 284b427..8f5290d 100644
> --- a/src/mapi/glapi/gen/glX_proto_common.py
> +++ b/src/mapi/glapi/gen/glX_proto_common.py
> @@ -56,7 +56,7 @@ class glx_print_proto(gl_XML.gl_print_base):
>          for param in func.parameterIterator():
>              if outputs_also or not param.is_output:
>                  if param.is_image():
> -                    [dim, w, h, d, junk] = param.get_dimensions()
> +                    _, w, h, d, _ = param.get_dimensions()
>  
>                      compsize = '__glImageSize(%s, %s, %s, %s, %s, %s)' % (w, h, d, param.img_format, param.img_type, param.img_target)
>                      if not param.img_send_null:
> 



More information about the mesa-dev mailing list