Message309736
With the file hello/__init__.py:
ham = 123
spam()spam()
I get the following:
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import hello
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "hello\__init__.py", line 2
spam()spam()
^
SyntaxError: invalid syntax
>>> import hello
>>> print hello
<module 'hello' from 'hello'>
>>> print dir(hello)
['__doc__', '__file__', '__name__', '__package__', '__path__']
>>>
I'd expect to get the SyntaxError twice, which is indeed what happens on at least Python 3.6 (Possibly earlier Python 3 versions).
Originally found here https://github.com/pallets/flask/issues/2423 & https://github.com/pallets/flask/pull/2588
I'm going to submit a PR with a fix. |
|
Date |
User |
Action |
Args |
2018-01-09 21:12:50 | Segev Finer | set | recipients:
+ Segev Finer |
2018-01-09 21:12:50 | Segev Finer | set | messageid: <1515532370.23.0.467229070634.issue32524@psf.upfronthosting.co.za> |
2018-01-09 21:12:50 | Segev Finer | link | issue32524 messages |
2018-01-09 21:12:49 | Segev Finer | create | |
|