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/2017-August/148989.html below:

[Python-Dev] PEP 550 v4

[Python-Dev] PEP 550 v4 [Python-Dev] PEP 550 v4Ethan Furman ethan at stoneleaf.us
Sat Aug 26 17:10:47 EDT 2017
On 08/26/2017 12:12 PM, David Mertz wrote:
> I'm convinced by the new section explaining why a single value is better than a namespace.  Nonetheless, it would feel
> more "Pythonic" to me to create a property `ContextVariable.val` whose getter and setter was `.lookup()` and `.set()`
> (or maybe `._lookup()` and `._set()`).
>
> Lookup might require a more complex call signature in rare cases, but the large majority of the time it would simply be
> `var.val`, and that should be the preferred API IMO.  That provides a nice parallel between `var.name <http://var.name>`
> and `var.val` also.

+1 to the property solution.

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