newforms SortedDictFromList needed still?

2 views
Skip to first unread message

SmileyChris

unread,
Oct 14, 2007, 12:41:05 AM10/14/07
to Django developers
[6506] fixed #5744.

Do we still need django.newforms.forms::SortedDictFromList?

The only thing which the newforms code has extra is its own copy
function which uses deepcopy. I'm at a loss to see why we're using it
there and not on the main SortedDict copy method.

Gary Wilson

unread,
Oct 15, 2007, 11:30:28 PM10/15/07
to django-d...@googlegroups.com
SmileyChris wrote:
> [6506] fixed #5744.
>
> Do we still need django.newforms.forms::SortedDictFromList?

Nice catch, it indeed looks like SortedDictFromList is no longer needed.

> The only thing which the newforms code has extra is its own copy
> function which uses deepcopy. I'm at a loss to see why we're using it
> there and not on the main SortedDict copy method.

Speaking of, is there a reason we are using deepcopy in copy()? Isn't copy
supposed to only create a shallow copy?

Perhaps we need to turn that into a __deepcopy__ method and change the places
in the code that are expecting copy() to return a deepcopy.

Gary

Reply all
Reply to author
Forward
0 new messages