Quantcast
Channel: How to use a dot "." to access members of dictionary? - Stack Overflow
Viewing all articles
Browse latest Browse all 40

Answer by Kugel for How to use a dot "." to access members of dictionary?

$
0
0

Derive from dict and and implement __getattr__ and __setattr__.

Or you can use Bunch which is very similar.

I don't think it's possible to monkeypatch built-in dict class.


Viewing all articles
Browse latest Browse all 40

Trending Articles