[New-bugs-announce] [issue2596] 2to3's fix_range needs fix_dict's context information

Collin Winter report at bugs.python.org
Tue Apr 8 21:12:48 CEST 2008


New submission from Collin Winter <collinw at gmail.com>:

2to3 should be able to translate the code snippet below successfully.
First guess: generalizing fix_dict's notion of special contexts would do
the trick.

import random

numbers = range(1, 50)
chosen = []

while len(chosen) < 6:
    number = random.choice(numbers)
    numbers.remove(number)
    chosen.append(number)

chosen.sort()
print("This week's numbers are", chosen)
print("The bonus ball is", random.choice(numbers))

----------
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
messages: 65204
nosy: collinwinter
priority: normal
severity: normal
status: open
title: 2to3's fix_range needs fix_dict's context information
type: behavior

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2596>
__________________________________


More information about the New-bugs-announce mailing list