python:attrdict

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
python:attrdict [2021/05/28 05:56] – 作成 ともやんpython:attrdict [2021/05/28 06:42] (現在) ともやん
行 1: 行 1:
 ====== AttrDict - 属性スタイルでアクセスできる辞書 ====== ====== AttrDict - 属性スタイルでアクセスできる辞書 ======
 +本家/ソースコード: [[git>bcj/AttrDict|GitHub - bcj/AttrDict: A dictionary that allows attribute-style access.]]\\
  
-ソード: [[git>bcj/AttrDict|GitHub bcj/AttrDict: A dictionary that allows attribute-style access.]]\\+===== インル ===== 
 +<WRAP prewrap 100%> 
 +<code> 
 +$ pip install attrdict 
 +</code> 
 +</WRAP> 
 +<WRAP prewrap 100% #result> 
 +<code> 
 +Collecting attrdict 
 +  Downloading attrdict-2.0.1-py2.py3-none-any.whl (9.9 kB) 
 +Collecting six 
 +  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) 
 +Installing collected packages: six, attrdict 
 +Successfully installed attrdict-2.0.1 six-1.16.0 
 +</code> 
 +</WRAP> 
 + 
 +===== 使い方 ===== 
 +<WRAP prewrap 100% #mincode> 
 +<code python> 
 +>>> from attrdict import AttrDict 
 +>>> ad = AttrDict({'foo''bar'}) 
 +>>> ad.foo 
 +'bar' 
 +>>> ad['foo'] 
 +'bar' 
 +</code> 
 +</WRAP>
  
  • python/attrdict.1622148970.txt.gz
  • 最終更新: 2021/05/28 05:56
  • by ともやん