This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年02月21日 03:00 by timClicks, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg153839 - (view) | Author: Tim McNamara (timClicks) * | Date: 2012年02月21日 03:00 | |
When developing Python code, I often find myself needing to run "rm *.pyc" so that the interpreter will ignore any new changes that I have made to source files. It's really frustrating when forgotten. Adding a flag to the reload builtin would go a long way to simplify this process. |
|||
| msg153887 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2012年02月21日 18:10 | |
I don't quite follow what you want. You say you want to *ignore* changes to source files, but that's the whole point of a reload. And I don't see how ignoring bytecode changes anything unless you are mucking with bytecode formats and don't want to have to continuously change the magic number. |
|||
| msg153888 - (view) | Author: Tim McNamara (timClicks) * | Date: 2012年02月21日 18:14 | |
No no, I don't want to ignore source files. I want to be able to change a .py file, then reload in the Python shell and for the changes to be applied. At the moment, .pyc files within a project complicate this. |
|||
| msg153892 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2012年02月21日 18:54 | |
Then I'm not understanding the problem as changes to source trump .pyc files in a reload(). It should make no difference that .pyc files even exist to a reload() as long as source is around. |
|||
| msg164533 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2012年07月02日 19:28 | |
Never heard back from OP. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:26 | admin | set | github: 58278 |
| 2012年07月02日 19:28:51 | brett.cannon | set | status: pending -> closed resolution: works for me messages: + msg164533 |
| 2012年02月21日 18:54:26 | brett.cannon | set | status: open -> pending messages: + msg153892 |
| 2012年02月21日 18:14:25 | timClicks | set | messages: + msg153888 |
| 2012年02月21日 18:10:04 | brett.cannon | set | nosy:
+ brett.cannon messages: + msg153887 |
| 2012年02月21日 10:29:39 | timClicks | set | title: reload(module, ignore_pyc=True) flag -> Idea: Add a flag to reload from source, e.g. reload(module, ignore_pyc=True) |
| 2012年02月21日 03:00:20 | timClicks | create | |