TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Inside Python Dict – an explorable explanation

111 pointsby eatitrawover 6 years ago

3 comments

stinosover 6 years ago
<i>Python lists are actually arrays — contiguous chunks of memory.</i><p>Just wondering here, is this guaranteed to always be the case? Practically it probably is, but does the Python spec (as in: the laguage, not one of it&#x27;s implementations) say a list must be implemented using contiguous memory of slots with Python objects? That seems so low-level and C-ish. Or does the OP actually mean <i>CPython</i> here for instance?
评论 #18758531 未加载
评论 #18756723 未加载
评论 #18756722 未加载
评论 #18757399 未加载
评论 #18757019 未加载
评论 #18758255 未加载
whoisnnamdiover 6 years ago
Thanks. Slowing realizing some of the benefits of dicts and trying to use them more in my code where I would have otherwise defaulted to another data structure.<p>They really are quite useful and intuitive to work with once you understand basic structure<p>I do sometimes worry about speed relative to other options though, especially in large chunks of data
deepakgover 6 years ago
Related: <a href="https:&#x2F;&#x2F;pyvideo.org&#x2F;pycon-us-2017&#x2F;modern-python-dictionaries-a-confluence-of-a-dozen-great-ideas.html" rel="nofollow">https:&#x2F;&#x2F;pyvideo.org&#x2F;pycon-us-2017&#x2F;modern-python-dictionaries...</a>