This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add more missing parentheses to Python calls to print
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 27 Nov 2014 12:32:46 +0400
- Subject: Re: [PATCH] Add more missing parentheses to Python calls to print
- Authentication-results: sourceware.org; auth=none
- References: <1417026833-781-1-git-send-email-simon dot marchi at ericsson dot com>
Hi Simon,
On Wed, Nov 26, 2014 at 01:33:53PM -0500, Simon Marchi wrote:
> I noticed that there are calls to Python's print outside the gdb.python
> directory, so this patch adds those that I found were missing. They were
> found by grepping for "python print [^(]", so it's always possible that
> I missed some others that use another pattern.
>
> Parentheses are mandatory with Python 3 when calling print.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.ada/py_range.exp: Add missing parentheses.
> * gdb.dwarf2/symtab-producer.exp: Same.
> * gdb.gdb/python-interrupts.exp: Same.
> * gdb.gdb/python-selftest.exp: Same.
This is pre-approved, but can you remove the space before
the opening parenthesis? Since "print" has become a function
in Python 3, and we try to follow the standard python style,
unlike our GNU Coding Style in C/C++, there should be no
space before the parenthesis.
Thank you!
--
Joel