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

Cameron Simpson cs at zip.com.au
Fri Mar 20 23:00:25 CET 2015


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>


More information about the Python-ideas mailing list