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

[Python-Dev] Identifier API

[Python-Dev] Identifier API [Python-Dev] Identifier APIGreg Ewing greg.ewing at canterbury.ac.nz
Sat Oct 15 01:32:50 CEST 2011
Martin v. Löwis wrote:
> That wouldn't be instead, but in addition - you need the
> variable name, anyway.

But the details of exactly how the name is constructed
could be kept as an implementation detail.

> Not sure whether there is actually
> a gain in readability - people not familiar with this would
> assume that it's a function call of some kind, which it would
> not be.

To me the benefit would be that the name you write as
the argument would be *exactly* the identifier it
represents.

If you have to manually add a prefix, there's room for
a bit of confusion, especially if the prefix itself
ends with an underscore. E.g. if the identifier is
"__init__" and the prefix is "PyID_", do you write
"PyID__init__" (two underscores) or "PyID___init__"
(three underscores?) And can you easily spot the
difference in your editor?

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