On Wed, Jan 30, 2019 at 3:43 AM Jonathan Fine wrote:
> I think Steve's suggestion fails in this situation. Suppose wibble.py
> contains a function fn. Now do
>import wibble
>fn = wibble.fn
># Modify and save wibble.py
>reload(wibble)
>fn()
>
Sure -- but this is just a
On Wed, 30 Jan 2019 at 16:34, Alex Walters wrote:
>
>
> > -Original Message-
> > From: Python-ideas > list=sdamon@python.org> On Behalf Of Jonathan Fine
> > Sent: Wednesday, January 30, 2019 6:40 AM
> > To: python-ideas
> > Subject: Re: [Python-ideas] Stack traces ought to flag
> I think using reload should raise warnings, since it doesn't work, and the
> reload case shouldn't be the killer of this really good idea.
In Python2, reload is in __builtin__ module (and so available without
import at the Python console).
Since Python 3.4 this functionality is in the
> -Original Message-
> From: Python-ideas list=sdamon@python.org> On Behalf Of Jonathan Fine
> Sent: Wednesday, January 30, 2019 6:40 AM
> To: python-ideas
> Subject: Re: [Python-ideas] Stack traces ought to flag when a module has
> been changed on disk
>
> I think Steve's
I've been bitten by this and it always costs me several minutes of confusion.
+1
> On 30 Jan 2019, at 11:17, Steven D'Aprano wrote:
>
> This thought is motivated by this bug report:
>
> https://bugs.python.org/issue35857
>
> If you import a module, then edit the .py file that goes with it,
I think Steve's suggestion fails in this situation. Suppose wibble.py
contains a function fn. Now do
import wibble
fn = wibble.fn
# Modify and save wibble.py
reload(wibble)
fn()
I've posted a message to this effect in the original bug
https://bugs.python.org/msg334553
Please note
On Wed, 30 Jan 2019 at 3:48 PM, Steven D'Aprano wrote:
> This thought is motivated by this bug report:
>
> https://bugs.python.org/issue35857
>
> If you import a module, then edit the .py file that goes with it, and
> then an exception occurs, the stack trace can show the wrong line.
>
> It
This thought is motivated by this bug report:
https://bugs.python.org/issue35857
If you import a module, then edit the .py file that goes with it, and
then an exception occurs, the stack trace can show the wrong line.
It doesn't happen very often, but when it does happen, it can be very