Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] The current dict is not an "OrderedDict"

Stefan Krahstefan at bytereef.org
Tue Nov 7 09:06:42 EST 2017


On Wed, Nov 08, 2017 at 12:01:04AM +1000, Nick Coghlan wrote:> > The recent proposal was primarily about guaranteeing the insertion order of> > dict literals.> >> > If further guarantees are proposed, perhaps it would be a good idea to> > open a new thread and state what exactly is being proposed.>> "Insertion ordered until the first key removal" is the only guarantee> that's being proposed.>> OrderedDict just comes into the discussion because reaching for its> stronger guarantees is currently the only way to obtain that guarantee> in a formally implementation-independent and future-proof way.Ok good, I was primarily worried about collections.UnorderedDict coming upand users thinking that OrderedDict could be replaced entirely by dict().Stefan Krah


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp