ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
python.xmldict.XmlDictObject Class Reference

module implementation ---------------------------------------------------— More...

Inheritance diagram for python.xmldict.XmlDictObject:
Collaboration diagram for python.xmldict.XmlDictObject:

Public Member Functions

def __init__ (self, initdict=None)
 
def __getattr__ (self, item)
 
def __setattr__ (self, item, value)
 
def __str__ (self)
 def getitem(self, item): o = dict.__getitem__(self, item) if isinstance(o, str): return _xml_unescape(o) return o More...
 
def unwrap (self)
 

Static Public Member Functions

def wrap (x)
 

Static Private Member Functions

def _unwrap (x)
 

Detailed Description

module implementation ---------------------------------------------------—

Definition at line 26 of file xmldict.py.

Constructor & Destructor Documentation

◆ __init__()

def python.xmldict.XmlDictObject.__init__ (   self,
  initdict = None 
)

Definition at line 27 of file xmldict.py.

27  def __init__(self, initdict=None):
28  if initdict is None:
29  initdict = {}
30  dict.__init__(self, initdict)
31 

Member Function Documentation

◆ __getattr__()

def python.xmldict.XmlDictObject.__getattr__ (   self,
  item 
)

Definition at line 32 of file xmldict.py.

32  def __getattr__(self, item):
33  return self.__getitem__(item)
34 

◆ __setattr__()

def python.xmldict.XmlDictObject.__setattr__ (   self,
  item,
  value 
)

Definition at line 35 of file xmldict.py.

35  def __setattr__(self, item, value):
36  self.__setitem__(item, value)
37 

◆ __str__()

def python.xmldict.XmlDictObject.__str__ (   self)

def getitem(self, item): o = dict.__getitem__(self, item) if isinstance(o, str): return _xml_unescape(o) return o

def setitem(self, item, value): if isinstance(value, str): value = _xml_unescape(value) dict.__setitem__(self, item, value)

Definition at line 49 of file xmldict.py.

49  def __str__(self):
50  if '_text' in self:
51  return self['_text']
52  else:
53  return dict.__str__(self)
54 

◆ _unwrap()

def python.xmldict.XmlDictObject._unwrap (   x)
staticprivate

Definition at line 66 of file xmldict.py.

66  def _unwrap(x):
67  if isinstance(x, dict):
68  return dict ((k, XmlDictObject._unwrap(v))
69  for (k, v) in x.iteritems())
70  elif isinstance(x, list):
71  return [XmlDictObject._unwrap(v) for v in x]
72  else:
73  return x
74 

◆ unwrap()

def python.xmldict.XmlDictObject.unwrap (   self)

Definition at line 75 of file xmldict.py.

75  def unwrap(self):
76  return XmlDictObject._unwrap(self)
77 

◆ wrap()

def python.xmldict.XmlDictObject.wrap (   x)
static

Definition at line 56 of file xmldict.py.

56  def wrap(x):
57  if isinstance(x, dict):
58  return XmlDictObject ((k, XmlDictObject.wrap(v))
59  for (k, v) in x.iteritems())
60  elif isinstance(x, list):
61  return [XmlDictObject.wrap(v) for v in x]
62  else:
63  return x
64 

The documentation for this class was generated from the following file:
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
python.PyAthenaComps.__setattr__
__setattr__
Definition: PyAthenaComps.py:39