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/2003-October/039658.html below:

[Python-Dev] Alternate notation for global variable assignments

[Python-Dev] Alternate notation for global variable assignmentsAlex Martelli aleaxit at yahoo.com
Mon Oct 27 18:07:33 EST 2003
On Monday 27 October 2003 11:55 pm, Zack Weinberg wrote:
   ...
> Somewhat warty suggestion: take lst[:var] to be a slice, but
> lst[(:var)] to be a global variable reference.  And lst[:(:var)] to be
> a slice on a global, etc. etc.

That would work -- and with the :: (rather than single :) stropping
which Guido seems to prefer, too.  As long as ::name or
scope::name are always (parenthesized) when not doing so
would be ambiguous (same general rules as, say, for tuples),
which in their case would seem to be "within brackets only",
I think :: stropping would work fine -- and perhaps avoid some
possible single-: ambiguity in dictionary display such as

d = { a:b:c }

which would require further parenthesization -- with :: stropping,

d = { a::b:c }

and

d = { a:b::c }

are unambiguous, although parentheses would no doubt be
advisable anyway to help human readers.


Alex


More information about the Python-Dev mailing list

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