Belle II Software light-2406-ragdoll
AttrDict Class Reference

Public Member Functions

def __init__ (self, content)
 
def __getattr__ (self, key)
 

Private Attributes

 __content
 Dictionary we want to access via attributes.
 

Detailed Description

Simple wrapper class to allow accessing dictionary elements via
attribute access

Definition at line 137 of file format.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  content 
)
Remember the dictionary

Definition at line 141 of file format.py.

141 def __init__(self, content):
142 """Remember the dictionary"""
143
144 self.__content = content
145

Member Function Documentation

◆ __getattr__()

def __getattr__ (   self,
  key 
)
Return any dictionay element as attribute

Definition at line 146 of file format.py.

146 def __getattr__(self, key):
147 """Return any dictionay element as attribute"""
148 return self.__content[key]
149
150

Member Data Documentation

◆ __content

__content
private

Dictionary we want to access via attributes.

Definition at line 144 of file format.py.


The documentation for this class was generated from the following file: