yamasushi(2013/04/22 04:09:08 UTC) <ordered-dictionary>についてまとめてみます。
Return an instance of a dict subclass, supporting the usual dict methods. An OrderedDict is a dict that remembers the order that keys were first inserted. If a new entry overwrites an existing entry, the original insertion position is left unchanged. Deleting an entry and reinserting it will move it to the end.
New in version 2.7.
- kaki
<dictionary> には ref がないんですね.でも <ordered-dictionary> は <sequence> を継承していて <sequence> には ref があるので…と思ったら referencer メソッドが無いと言われてしまった.
<dictionary> は ref で dict-get できればいいような気がします.<hash-table> や <tree-map> でも ref 定義してありますし.
- shiro
<dictionary>にrefがまだ無いのは、ordered-dictionaryでsequenceのrefと意味がかぶるからどうしようかなと思って保留にしてた気がします。
Tags: gauche.dictionary, gauche.sequence, gauche.collection