jacinle.utils.container#
Module attributes
|
A simple global dict-like object. |
Classes
A simple container that wraps a dict and provides attribute access to the dict. |
|
A simple container that wraps a dict and provides attribute access to the dict. |
|
A set that keeps the order of the elements. |
|
Create a object that allows only a fixed set of attributes to be set. |
Class G
- class G[source]#
Bases:
dict
A simple container that wraps a dict and provides attribute access to the dict.
Example
>>> g = G() >>> g.a = 1 >>> g['b'] = 2
- format(sep=': ', end='\n')[source]#
Format the dict as a string using
jacinle.utils.printing.kvformat()
.
- print(sep=': ', end='\n', file=None)[source]#
Print the dict using
jacinle.utils.printing.kvprint()
.
Class GView
- class GView[source]#
Bases:
object
A simple container that wraps a dict and provides attribute access to the dict. In contrast to
G
, this class wraps around an existing dict.- __new__(**kwargs)#
- format(sep=': ', end='\n')[source]#
Format the dict as a string using
jacinle.utils.printing.kvformat()
.
- print(sep=': ', end='\n', file=None)[source]#
Print the dict using
jacinle.utils.printing.kvprint()
.
Class OrderedSet
- class OrderedSet[source]#
Bases:
object
A set that keeps the order of the elements.
- __new__(**kwargs)#
Class SlotAttrObject