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/2002-November/029959.html below:

[Python-Dev] would warnings be appropriate for probably-misused global statements?

[Python-Dev] would warnings be appropriate for probably-misused global statements? [Python-Dev] would warnings be appropriate for probably-misused global statements?Chermside, Michael mchermside@ingdirect.com
Wed, 6 Nov 2002 13:33:31 -0500
> I'm starting to think that it might help overcome that=20
> confusion if "global" gave warnings when used in =
probably-inappropriate ways:=20
> not inside a function, or about a variable that the function does not, =
in=20
> fact, bind nor re-bind.  Is there agreement that this might be =
helpful?

That sounds helpful to me. Essentially you're declaring that it's an
error (well... warning) to use the global statement in a context where
it can perform no possible function. And given the name, it's an easy
mistake for newbies to make... assuming that all "global variables" need
the "global" statement.

-- Michael Chermside



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