PyCon 2010: The Mighty Dictionary Presented by Brandon Craig Rhodes
Пікірлер: 23
@k3v1l10 жыл бұрын
May your hashes be unique, Your Has tables never full. And may your keys rarely collide as well
@RohanAnand4176 жыл бұрын
Amen!
@ComputerVisionPro3 жыл бұрын
Ameen
@akshy4712 жыл бұрын
After watching this, I bet I'll land that CEO role in Google.
@DenisBTV7 жыл бұрын
The clearest Python dictionary background explanation! Thanks!
@Naz-yi9bs2 жыл бұрын
The way he says "Baaaaal" dying. Amazing detailed presentation, thank you!
@kartikeysingh97644 жыл бұрын
"Equal values should have equal hashes regardless of their types" one of the most important points I found from this talk and also, copy() the dict to shrink it down if lots of deletion.
@surashreekulkarni61157 жыл бұрын
Kickass!! Really well explained!
@drizzyDreF7 жыл бұрын
This was very helpful
@tomaszszulc72597 жыл бұрын
Awesome talk!
@aaronhall80398 жыл бұрын
Where can we find specific documentation about this, or will we have to derive an understanding of this by using a C debugger or a static analysis of the C source?
@sohangchopra64782 жыл бұрын
why is the video quality so bad???
@vikingden84026 жыл бұрын
The clearest Python dictionary background explanation! Thanks! BTW, slides: rhodesmill.org/brandon/slides/2010-03-pycon/
@hamman_samuel7 жыл бұрын
Used words from an English dictionary to input elements into a Python dictionary. And all the undergrads screamed in agony.
@hiwaqas7 жыл бұрын
When going for lookup, how is the path to a certain key known? Is it stored/cached when the dict was being formed? Or is the path taken, dependent on the higher bits of the hash?
@justgivemethetruth9547 жыл бұрын
24:26
@vincentphilippe_183 жыл бұрын
A hash function return the same hash for one value. So given any value, a hash function can retrieve where a data is stored. That's why here it use bit() function because every value have a unique 'bits' value representation.
@justgivemethetruth9547 жыл бұрын
So, does the lookup then try to match the key every time the has points to a given slot? And then if the key goes not match, it goes through successive keys until it finds a match? This would seem to say to me that unless you need to and cannot use a list, stay away from dicts? And so this is really a trick lecture ... only a problem with miniscule sizes of dicts, but seems like you always are wasting 1/3 of the space allocated for your dict addressiing since it will resize, quadrupling or doubling when it gets to 2/3? No problem, RAM is cheap!
@4rph3n8 жыл бұрын
What is the "bits" function you're using?
@aaronhall80398 жыл бұрын
+Sebastian Wozny It is something like: def bits(integer): return bin(integer)[2:]
@jursamaj5 жыл бұрын
It's right there in the video at 0:12: def bits(n): n+=2**32 return bin(n)[-32:]
@dzidmail Жыл бұрын
What if value is a large string that doesn't fit between two hashed memory pointers? I think something is missing from how this really works.