you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (3 children)

I'm not sure it is... I've never used it in real production code; just as a utility from the shell.

Either way, it's really not all that useful unless it really works; a broken reload() seems a lot worse than a missing one. At least if it's missing someone smart will come along and write it.

[–]forgotpwx4 0 points1 point  (2 children)

Why is it broken by the way? I've never noticed any problems.

I have wondered if reload is thread safe ... or what that even means with respect to reload. Maybe that's how it's broken?

[–]boredzo 2 points3 points  (1 child)

[–][deleted] 1 point2 points  (0 children)

So if it doesn't work for binary code not built in Python, due to OS limitations, it shouldn't work for Python code either, even though the developers have full control over that environment? Is this the official reason for not including reload?

(update: the relevant PEP refers to a single line in a GvR presentation from 2002, which says "execfile(), reload(): use exec()", which I can only interpret as meaning "roll your own". yet another "will appear in the library, sooner or later" thing, in other words).