3 ms·
> Changed in version 3.7: As a dict subclass, Counter Inherited the capability to remember insertion order. Yes but the question as framed ("first failed looku
by BugsJustFindMe 6y ago
> Changed in version 3.7: As a dict subclass, Counter Inherited the capability to remember insertion order.
Yes but the question as framed ("first failed lookup initilizes to 1, the second to 2, etc") does not require counting the occurrences anymore, so using a counter does more work than necessary. If you want both counts _and_ order, then, yeah, counter is great.