Closed Bug 409276 Opened 17 years ago Closed 8 years ago

let's use defaultdict in compare-locales

Categories

(Mozilla Localizations :: Infrastructure, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: Pike, Unassigned)

Details

Attachments

(1 file)

I have more cleanup for compare-locales, moving over from regular dicts to track stuff to defaultdict, which makes the code significantly easier to read. I removed a bunch of has_key, too, again, to make the code nicer to read. Basically, dict-cleanup overall.
Attachment #294093 - Flags: review?(bhearsum)
Comment on attachment 294093 [details] [diff] [review] use default dicts or dict subclasses to default results instead of iffing Cancelling this request,this is a nice patch, but I'm not sure it'll apply on trunk cleanly, nor does it match well with other patches in the queue. It has still some python-educational value for Armen, like has_key vs in, and the beauty of defaultdict. Leaving the bug open just in case it's still relevant at some point.
Attachment #294093 - Flags: review?(bhearsum)
Thanks Axel, I read all of these patches you do and I try to extract info from there, even though at this specific moment I am more into getting ready for my big three coding projects for next semester. BTW, you might like to check http://www.assembla.com (subversion, wiki, time tracking, trac, scrum reports and others), the project can be made public if needed. ------------------ What I have learn from this patch is: A) I think you have at your computer 2 trees from this line (if I am not mistaken) diff --git a/mozilla/testing/tests/l10n/lib/Mozilla/CompareLocales.py b/mozilla/testing/tests/l10n/lib/Mozilla/CompareLocales.py B) http://docs.python.org/lib/defaultdict-objects.html defaultdict is a subclass of the builtin dict class and is new to Python 2.5 It is also part of high-performance container datatypes of python ----------------- Hey, is there are a way to subscribe to the changes added to the l10n scripts inside "Testing"? It might be bonsai if not mistaken? Is there any page showing explicit examples on how to use these scripts?
Component: Testing → Infrastructure
Product: Core → Mozilla Localizations
QA Contact: testing → infrastructure
Given how much the code has changed, I assume this is a wontfix now.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: