Message100600
| Author |
dmascialino |
| Recipients |
dmascialino, jjconti |
| Date |
2010年03月07日.19:40:07 |
| SpamBayes Score |
1.6158186e-11 |
| Marked as misclassified |
No |
| Message-id |
<1267990809.73.0.116039880896.issue8087@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Example:
---------------- mod.py ----------------
def f():
a,b,c = 1,2
print b
----------------------------------------
If i do:
>>> import mod
>>> mod.f()
I get:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mod.py", line 2, in f
a,b,c = 1,2
ValueError: need more than 2 values to unpack
If i fix the source:
---------------- mod.py ----------------
def f():
a,b,c = 1,2,3
print b
----------------------------------------
And do:
>>> mod.f()
I get:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mod.py", line 2, in f
a,b,c = 1,2,3
ValueError: need more than 2 values to unpack
The problem is that the source shown is updated, but the executed code is old, because it wasn't reloaded.
Feature request:
If the source code shown was modified after import time and it wasn't reloaded, a warning message should be shown.
Example:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mod.py", line 2, in f WARNING: Modified after import!
a,b,c = 1,2,3
ValueError: need more than 2 values to unpack
or something like that. Maybe "use reload()" might appear. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年03月07日 19:40:09 | dmascialino | set | recipients:
+ dmascialino, jjconti |
| 2010年03月07日 19:40:09 | dmascialino | set | messageid: <1267990809.73.0.116039880896.issue8087@psf.upfronthosting.co.za> |
| 2010年03月07日 19:40:07 | dmascialino | link | issue8087 messages |
| 2010年03月07日 19:40:07 | dmascialino | create |
|