CadQuery / CadQuery/cadquery

Matrix Class is missing the __repr__() special method and therefore can't be displayed

Open
#788 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.8k
Forks
541
Avg merge
3d 2h
Merged PRs (30d)
5

Description

Please consider adding the `__repr__` special method to the Matrix Class. Something like this:

```python
def __repr__(self):
result = ''
for r in range(4):
for c in range(4):
result += str(self.__getitem__((r,c)))
if c!=3:
result += ', '
result += '\n'
return result
```
Being able to display the matrix helps with debugging (for example, trying to determine if the rotate methods use radians or degrees).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.