On 19 September 2016 at 23:13, אלעזר <elaz...@gmail.com> wrote:
> Alternative syntax might be that of import decorators
>
> @from_pip("attrs")
> import attr

At which point you may as well just (insert disclaimer about "using
pip's internal API isn't supported" here, and glossing over the fact
that pip doesn't yet have an install function with this API) do

import pip
pip.install('attrs')
import attr

It's not as if that's functionally any different, or in practical
terms any harder to read. And it needs no change to Python.

Paul
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to