This representation is pretty useless once the signal has more than about 10 channels. Printing the object yields the same output. I think it would be very helpful to view a summary of the Edf object. There are several options that could be implemented:
Shorten the __repr__ to something like Edf (64 signals, 2234 annotations)
Implement a custom __str__ method that outputs more information than the repr
Add a summary method that behaves like (2), but could also have a verbosity parameter to control the level of detail.
Personally, I don't really like option (3), because having good __repr__ and __str__ representations should be sufficient.
The current
__repr__
ofEdf
objects is very verbose, e.g. after loadingS001R09.edf
:This representation is pretty useless once the signal has more than about 10 channels. Printing the object yields the same output. I think it would be very helpful to view a summary of the
Edf
object. There are several options that could be implemented:__repr__
to something likeEdf (64 signals, 2234 annotations)
__str__
method that outputs more information than the reprsummary
method that behaves like (2), but could also have a verbosity parameter to control the level of detail.Personally, I don't really like option (3), because having good
__repr__
and__str__
representations should be sufficient.