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/2011-June/111934.html below:

[Python-Dev] PEP 3101 implementation vs. documentation

[Python-Dev] PEP 3101 implementation vs. documentation [Python-Dev] PEP 3101 implementation vs. documentationGreg Ewing greg.ewing at canterbury.ac.nz
Tue Jun 14 02:36:16 CEST 2011
Ben Wolfson wrote:

> If by "item selector" you mean (using the names from the grammar in
> the docs) the element_index, I don't see why this should be the case;
> dictionaries can contain non-identified keys, after all.

Of course they can, but that's not the point. The point is
that putting arbitrary strings between [...] in a format
spec without any form of quoting or requirement for bracket
matching leads to something that's too confusing for humans
to read.

IMO the spec should be designed so that the format string
can be parsed using the same lexical analysis rules as
Python code. That means anything that is meant to "hang
together" as a single unit, such as an item selector,
needs to look like a single Python token, e.g. an integer
or identifier.

I realise this is probably more restrictive than the PEP
suggests, but I think it would be better that way all round.

-- 
Greg
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