[issue4423] 2to3 replaces "arbitrary" variables

2008-11-24 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Yes, this a known issue. You can currently circumvent it by disabling the imports fixer. -- nosy: +benjamin.peterson priority: -> normal ___ Python tracker <[EMAIL PROTECTED]>

[issue4423] 2to3 replaces "arbitrary" variables

2008-11-24 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: Are there any plans to improve that? In the specific case, it would help if commands gets only replaced if an import of commands appears "in scope" (or, if that is too difficult, anywhere in the file). I think 2to3 should create a list of all

[issue4423] 2to3 replaces "arbitrary" variables

2008-11-24 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: This bug certainly has been reported before, so I'll see if I can find time for it. ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue4424] Add support for a cmp, or key argument to heapq functions.

2008-11-24 Thread Alex
New submission from Alex <[EMAIL PROTECTED]>: Currently the heapq module can only really be used if your data has it's own ordering defined. There is no way to do a custom ordering. From my cursory review of the code it looks like some of the lower level functions actually take these kwargs, bu

[issue4402] os.getenv('PATH') return different result between 2.5 and 3.0rc3

2008-11-24 Thread 赵现刚
赵现刚 <[EMAIL PROTECTED]> added the comment: I have installed both py2.5 and py3.0rc3. I got the result as follows: 1.py3.0 : from the windows start menu-->run, type in "python" ,and py3.0 will startup(which I don't understand why),then execute import ossys_path=os.getenv('PATH')print(sys_path

[issue4424] Add support for a cmp, or key argument to heapq functions.

2008-11-24 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: This is a duplicate of a previously rejected request. The usual approach is to load the heap with (priority, record) tuples. -- nosy: +rhettinger resolution: -> duplicate status: open -> closed __

[issue4424] Add support for a cmp, or key argument to heapq functions.

2008-11-24 Thread Alex
Alex <[EMAIL PROTECTED]> added the comment: Apologies, searching didn't yield that. That's not necessarily always easy, for example I'd like to use heapq to merge iterators coming from the database. ___ Python tracker <[EMAIL PROTECTED]>

<    1   2