Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71862 > unrolled thread
| Started by | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| First post | 2014-05-21 07:03 -0700 |
| Last post | 2014-05-21 07:03 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: All-numeric script names and import Ethan Furman <ethan@stoneleaf.us> - 2014-05-21 07:03 -0700
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Date | 2014-05-21 07:03 -0700 |
| Subject | Re: All-numeric script names and import |
| Message-ID | <mailman.10197.1400683720.18130.python-list@python.org> |
On 05/21/2014 06:46 AM, Chris Angelico wrote:
>
> # from 1 import app as application # Doesn't work with a numeric name
> application = __import__("1").app
The statement form of import only works with valid Python identifiers. So all numeric names won't work, names with
dashes won't work, etc.
--
~Ethan~
Back to top | Article view | comp.lang.python
csiph-web