[EMAIL PROTECTED] wrote:
Marc 'BlackJack' Rintsch:
counter['B'] = counter.get('B', 0) + 1
If you benchmark it, you will find that using the get() method it's
quite slower.
Slower than
if 'B' in counter:
> counter['B'] += 1
> else:
> counter['B'] = 1
?
It is not slower than default
Mike Driscoll wrote:
A lot of people recommend Lutz's "Learning Python". While I haven't
read it, I have read his follow-up "Programming Python" and it was
I found Learning Python good for learning, and a useful reference
sometimes, but it can seem very slow paced if you already know some
oth
Before I set out to reinvent the wheel.
I want a dictionary-like structure for which most lookups will be on a
key that is not in the "dictionary"; in which case I want a key/value
returned which is the closest key that is less than the search term.
The batch solution of matching the values