INNER CODE UNIT · Python

indent

KATRIN-Experiment/Kassiopeia · Scripts/gen-bindings-docs.py:150

        indent = level*spaces

        if not self.children and not self.attributes:
           print(f'{indent}<{key}/>')
           return

        if self.attributes:
            print(f'{indent}<{key}')
            for attr_key in list(sorted(self.attributes.keys()))[:max_attributes]:
                attr = self.attributes[attr_key]
                print(f'{indent}{spaces}{attr_key}="({attr.name})"')
            #if not self.children:
            #    print(f'{indent}/>')
            #    return
            print(f'{indent}>')
        else:
            print(f'{indent}<{key}>')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…