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