Hello, On Mon, 16 Nov 2020 19:47:32 +1100 Chris Angelico <ros...@gmail.com> wrote:
> > def sub(): > > # Gimme powerz back > > from __future__ import const > > BAR: const = 2 > > SyntaxError: from __future__ imports must occur at the beginning of > the file > > If it's just a normal symbol imported from a module, it would have to > be from something other than __future__. Right, so the story unfolds: for some time I was thinking that it would be nice to have something like "from __present__ import ...". Or perhaps __lang__. Why, __python__ would work too, if we agree that CPython != Python. For comparison, in MicroPython, "const" lives in: from micropython import const (And originally it's a (pseudo/intrinsic/macro)function, from pre-variable-annotation times: FOO = const(1) ) [] -- Best regards, Paul mailto:pmis...@gmail.com _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/UNET56ITQFOEMAX5JS5NHJG42H6PSGI4/ Code of Conduct: http://python.org/psf/codeofconduct/