On Feb 9, 2008, at 8:27 PM, Brett Cannon wrote:

> On Feb 8, 2008 5:03 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>> On Feb 8, 2008 4:51 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
>>> I recommend dropping the dict.copy() method from Py3.0.
>>>
>>> * We can already write:  newd = copy.copy(d).
>>> * We can also write:     newd = dict(d)
>>> * Both of those approaches also work for most other containers.
>>> * The collections.Mapping ABC does not support copy().
>>> * copy() is not a universal feature of mapping like objects
>>> * Lists do not have a copy() method.
>>> * If we drop dict.copy(), I'll can also drop set.copy() which is  
>>> unneeded.
>>>
>>> Let's make the basic APIs as clean and parallel as possible.
>>
>> Makes sense.  I request that you also implement the transitional  
>> code:
>> either a fixer for 2to3 or (perhaps more realistically) a warning to
>> dict.copy() when -3 is given.
>
> +1 on the warning over the fixer. Since 2to3 can't do it perfectly I
> think it would be better to let users deal with it directly.

Has anyone thought of making a execution-informed converter? If you  
have a comprehensive test suite, it seems that it ought be possible to  
use the actual execution of the test suite, under a trace hook  
perhaps, or something of that sort, to inform the converter and allow  
it to correctly make changes like this.

James
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to