Message226659
Changing the imports only is straightforward, but I'm having trouble detecting and changing future uses of the variables, without also clobbering user-defined variables with the same names.
I notice some of the current fixers have similar problems, for example the itertools fixer changes:
```
def imap(): pass
imap()
```
to
```
def imap(): pass
map()
```
This patch is a little smarter than that, but it only detects top-level definitions. For example, the lowercase in
```
class Foo:
def __init__(self):
self.lowercase = "blargh"
```
still gets renamed.
I can work on this more, but would like to know:
a) whether this fix is still wanted
b) how smart it needs to be
c) whether my approach is reasonable. I feel like there should be an easier way. |
|
Date |
User |
Action |
Args |
2014-09-09 20:52:39 | superluser | set | recipients:
+ superluser, benjamin.peterson, ezio.melotti, meador.inge, BreamoreBoy, Anthony.Kong |
2014-09-09 20:52:39 | superluser | set | messageid: <1410295959.6.0.502478960614.issue13272@psf.upfronthosting.co.za> |
2014-09-09 20:52:39 | superluser | link | issue13272 messages |
2014-09-09 20:52:39 | superluser | create | |
|