The magic-removal model unit tests do a lot of this:

    list(Musician.objects.all())

That's because doing "Musician.objects.all()" at the Python
interactive interpreter doesn't actually display the data. Seems like
the list() is kind of clunky, and that QuerySet's __repr__() method
should display the list of results.

I can't think of any downsides to implementing this behavior, as it
would clarify the unit tests, clarify the tutorial/documentation and
make it easier to interact with objects in the interactive
interpreter. Anybody see problems with this idea?

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Reply via email to