[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-dev
Subject:    Re: [Python-Dev] PEP 408 -- Standard library __preview__ package
From:       Matt Joiner <anacrolix () gmail ! com>
Date:       2012-02-04 14:02:55
Message-ID: CAB4yi1NiZDwoR0m5dDF+-R6bir7eJLncuKGc6gOZSbKcQqr2SA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


+1
On Feb 4, 2012 8:37 PM, "Paul Moore" <p.f.moore@gmail.com> wrote:
>
> On 4 February 2012 11:25, Steven D'Aprano <steve@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.
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
http://mail.python.org/mailman/options/python-dev/anacrolix%40gmail.com

[Attachment #5 (text/html)]

<p>+1<br>
On Feb 4, 2012 8:37 PM, &quot;Paul Moore&quot; &lt;<a \
href="mailto:p.f.moore@gmail.com">p.f.moore@gmail.com</a>&gt; wrote:<br> &gt;<br>
&gt; On 4 February 2012 11:25, Steven D&#39;Aprano &lt;<a \
href="mailto:steve@pearwood.info">steve@pearwood.info</a>&gt; wrote:<br> &gt; &gt; It \
strikes me that it would be helpful sometimes to programmatically<br> &gt; &gt; \
recognise &quot;preview&quot; modules in the std lib. Could we have a \
recommendation<br> &gt; &gt; in PEP 8 that such modules should have a global variable \
called PREVIEW, and<br> &gt; &gt; non-preview modules should not, so that the \
recommended way of telling them<br> &gt; &gt; apart is with hasattr(module, \
&quot;PREVIEW&quot;)?<br> &gt;<br>
&gt; In what situation would you want that when you weren&#39;t referring to a<br>
&gt; specific module? If you&#39;re referring to a specific module and you<br>
&gt; really care, just check sys.version. (That&#39;s annoying and ugly enough<br>
&gt; that it&#39;d probably make you thing about why you are doing it - I<br>
&gt; cannot honestly think of a case where I&#39;d actually want to check in<br>
&gt; code if a module is a preview - hence my question as to what your use<br>
&gt; case is).<br>
&gt;<br>
&gt; Feels like YAGNI to me.<br>
&gt; Paul.<br>
&gt; _______________________________________________<br>
&gt; Python-Dev mailing list<br>
&gt; <a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
&gt; <a href="http://mail.python.org/mailman/listinfo/python-dev">http://mail.python.org/mailman/listinfo/python-dev</a><br>
 &gt; Unsubscribe: <a \
href="http://mail.python.org/mailman/options/python-dev/anacrolix%40gmail.com">http://mail.python.org/mailman/options/python-dev/anacrolix%40gmail.com</a><br>
 </p>



_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev%40progressive-comp.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic