[Python-ideas] gofmt for Python: standardized styling as a language feature

Ryan Gonzalez rymg19 at gmail.com
Fri Mar 20 23:06:53 CET 2015


Can't you do that witout pragmas?

gcc tst.c -Wall -Wno-parenthesis -Wno-unused-variable ...


On Fri, Mar 20, 2015 at 5:00 PM, Cameron Simpson <cs at zip.com.au> wrote:

> On 20Mar2015 14:02, Ben Finney <ben+python at benfinney.id.au> wrote:
>
>> Cameron Simpson <cs at zip.com.au> writes:
>>
>>> In a former life I got to use SGI's C compiler. Like GCC, it had a
>>> "lots of warnings" mode, somewhat like a builtin lint. _Unlike_ GCC,
>>> the SGI compiler let one suppress specific warnings, which was very
>>> very nice.
>>>
>>
>> GCC now has “diagnostic pragmas” to turn on/off specific diagnostics
>> <URL:https://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/
>> Diagnostic-Pragmas.html#Diagnostic-Pragmas>,
>> is that what you mean?
>>
>
> In terms of function, yes, though it says "only warnings [...] can be
> controlled, and not all of them". In terms of usability, no.
>
> I'd rather put compiler options to control noise in Makefiles (or whatever
> built system) rather than litter code with compiler specific junk which has
> no effect (one hopes) elsewhere (other platforms, other compilers).
>
> Also, I don't think these #pragmas were around at the time:-)
>
> Cheers,
> Cameron Simpson <cs at zip.com.au>
>
> Tim's Top 5:
> #5. Know when to give cages the bird.
> #4. I'm not hanging off, so you don't need to hang off either.
>     (especially on the "up" side)
> #3. Always let me know when you're gonna get on and off.  And by God,
>     don't let your boot scratch my polished exhaust canister.
> #2. Remain seated until the aircraft has safely stopped at the
>     passenger terminal and the seat belt sign has been extinguished.
> #1. Shut the hell up, it'll all be over in a minute.
>        - Timothy R. Redden <reddent at sequoia.csus.edu>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>



-- 
Ryan
[ERROR]: Your autotools build scripts are 200 lines longer than your
program. Something’s wrong.
http://kirbyfan64.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150320/72bcf94f/attachment.html>


More information about the Python-ideas mailing list