Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
.view_widget() on LazyList to use menpowidgets to view items #753
It's increasingly common in Menpo to use
Viewing lazy list content with widgets typically looks like this currently:
from menpowidgets import visualize_images visualize_images(mio.import_images('./foo'))
whilst this is fine, it's a very common operation, and we can do better.
I've started exploratory work on menpowidgets to add a
which is much more in-line with the usual menpo paradigm for object visualization.
@patricksnape I don't think that's really worth the complexity. It's very difficult to ensure that a lazy list is homogenous without loosing the lazy property (you'd have to execute all callables to determine their return type to really enforce the homogeneity constraint).
You could say that for index callables we assume the type of the callable return is fixed, but this is still an assumption - the callable could behave differently for different index inputs.
I know this is a little gross, but I believe here the practical connivence trumps that. Thoughts?
PS I guess I final option is a