python insertion-ordered dicts (beginner - intermediate) anthony explains #212

preview_player
Показать описание
today I talk about insertion ordered dictionaries and when you can rely on them (cpython3.6+) and the differences between collections.OrderedDict and normal dict (and recipes if you want to just use dict)

==========

I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!
Рекомендации по теме
Комментарии
Автор

I get that it can't be added to every "explains" video, but the history part at the beginning was pretty cool.
(And expertly executed by ordered browser tabs :D )
It added another inetersting layer. It would be great to see more of these history intros.

JakubYTb
Автор

for the last part, move_to_end (flase), why not dct = {key:dct.pop(), **dct}, or python 3.9 style with |, did not check the memory or timing but should be reasonable

HosseinMamaghanian
Автор

2 questions:
1. where is the implementation of move_to_end(false) in cpython, tried to find it and couldn't find.
2. in 7:40 I usually write. dct = _

yoav_caspi
Автор

Hey man, I am new to python. I read that sets are still not ordered. Do you know why sets don't have the same build as dictionaries?
Asking because I read sets and dictionaries have similar implementation

krishna
Автор

doesn't this make accessing it O(n)? since the indices are stored in an array i assume?

sadhlife
Автор

how did you delete all the text after the cursor in terminal?

sadhlife