Skip to content

Add __repr__ methods to classes #310

@jonbiemond

Description

@jonbiemond

Without __repr__ methods, class instances return hard to distinguish addresses when executed on in the REPL or a notebook.

>>> FEModel3D()
<Pynite.FEModel3D.FEModel3D object at 0x102d11f50>

Add a __repr__ method to make the object easily identifiable.

>>> FEModel3D()
FEModel3D(solution=None)

Files to add __repr__ methods to:

  • Analysis.py
  • BeamSegY.py
  • BeamSegZ.py
  • FEModel3D.py
  • FixedEndReactions.py
  • LoadCombo.py
  • Material.py
  • MatFoundation.py
  • Member3D.py
  • Mesh.py
  • Node3D.py
  • PhysMember.py
  • Plate3D.py
  • Quad3D.py
  • Rendering.py
  • Reporting.py
  • Section.py
  • ShearWall.py
  • Spring3D.py
  • Tri3D.py
  • Visualization.py
  • VTKWriter.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions