A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-December/011090.html below:

[Python-Dev] Pragmas and warnings

[Python-Dev] Pragmas and warningsPaul Prescod paulp@ActiveState.com
Sun, 17 Dec 2000 12:04:27 -0800
A couple of other threads started me to thinking that there are a couple
of things missing from our warnings framework. 

Many languages have pragmas that allow you turn warnings on and off in
code. For instance, I should be able to put a pragma at the top of a
module that uses string functions to say: "I know that this module
doesn't adhere to the latest Python conventions. Please don't warn me
about it." I should also be able to put a declaration that says: "I'm
really paranoid about shadowing globals and builtins. Please warn me
when I do that."

Batch and visual linters could also use the declarations to customize
their behaviors.

And of course we have a stack of other features that could use pragmas:

 * type signatures
 * Unicode syntax declarations
 * external object model language binding hints
 * ...

A case could be made that warning pragmas could use a totally different
syntax from "user-defined" pragmas. I don't care much.

 Paul



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4