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