[Python-ideas] from __pip__ import

אלעזר elazarg at gmail.com
Mon Sep 19 14:48:42 EDT 2016


Then you'll get

    SyntaxError: from __pip__ imports must occur at the beginning of the
file

Or "must be string literal or an identifier" if it's allowed outside the
beginning of the file.

On Mon, Sep 19, 2016 at 9:44 PM MRAB <python at mrabarnett.plus.com> wrote:

> On 2016-09-19 18:20, אלעזר wrote:
> > Obviously
> >
> >     from __pip__ import "run-lambda>=0.1.0"
> >
> > Which is ugly but not my fault :)
> >
> [snip]
> One possible problem I can see is that if it's quoted you might think
> that it's an expression and that you could also write:
>
>      package = "run-lambda>=0.1.0"
>      from __pip__ import package
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160919/da69e365/attachment-0001.html>


More information about the Python-ideas mailing list