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/2012-February/116204.html below:

[Python-Dev] PEP 408 -- Standard library __preview__ package

[Python-Dev] PEP 408 -- Standard library __preview__ package [Python-Dev] PEP 408 -- Standard library __preview__ packagePaul Moore p.f.moore at gmail.com
Sat Feb 4 13:35:57 CET 2012
On 4 February 2012 11:25, Steven D'Aprano <steve at pearwood.info> wrote:
> It strikes me that it would be helpful sometimes to programmatically
> recognise "preview" modules in the std lib. Could we have a recommendation
> in PEP 8 that such modules should have a global variable called PREVIEW, and
> non-preview modules should not, so that the recommended way of telling them
> apart is with hasattr(module, "PREVIEW")?

In what situation would you want that when you weren't referring to a
specific module? If you're referring to a specific module and you
really care, just check sys.version. (That's annoying and ugly enough
that it'd probably make you thing about why you are doing it - I
cannot honestly think of a case where I'd actually want to check in
code if a module is a preview - hence my question as to what your use
case is).

Feels like YAGNI to me.
Paul.
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