Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

make __repr__ short #34

Open
TaiSakuma opened this issue Mar 3, 2018 · 2 comments
Open

make __repr__ short #34

TaiSakuma opened this issue Mar 3, 2018 · 2 comments

Comments

@TaiSakuma
Copy link
Member

within one line
use str for long text
for all classes

@TaiSakuma
Copy link
Member Author

@TaiSakuma
Copy link
Member Author

an example: numpy array

In [11]: n = np.arange(5)

In [12]: repr(n)
Out[12]: 'array([0, 1, 2, 3, 4])'

In [13]: str(n)
Out[13]: '[0 1 2 3 4]'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant