On Monday, August 22, 2016 at 8:45:05 AM UTC-4, Chris Angelico wrote:
> On Mon, Aug 22, 2016 at 10:05 PM, Marko Rauhamaa <ma...@pacujo.net> wrote:
> > rocky <ro...@gnu.org>:
> >
> >> A slightly different but related problem is noting the Python dialect
> >> at the package-level.
> >
> > I don't know what if anything is needed support this idea, but one
> > option would be to just use "import":
> >
> >     import python3_5_17
> >
> > That would require Python and modules to install such empty modules to
> > indicate that they support the given API.
> 
> Preferable:
> 
> from python import v35
> 
> Then a single 'python.py' could have lines for every supported
> version, rather than forcing dozens of separate modules.
> 
> However, I don't think it's particularly necessary. Explicit version
> number checks should be very rare, and shouldn't be encouraged.
> Instead, encourage feature checks, as Steve gave some examples of.
> 
> ChrisA

Yes, "from python import v35" is better.

How do feature checks in the code address the problem static analysis of source 
code? 
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to