Message73457
I think you're missing the point. Imagine you are somebody who doesn't know
Python internals. You're looking at the doc page for deque and ask yourself
the question, "How do I tell if one of these is empty?". There's no
information ON THAT PAGE that answers that question. Your explanation is all
about "How do I compute the boolean value of a container?" The logical gap
is that you need to understand that to tell if it's empty, you should compute
the boolean value.
You give the page on boolean operations as part of the answer, but you need
to know to go look at that page in the first place. I should be able to look
at the page that describes a deque and find out everything I need to know
about that class on that page.
Essentially, what you're saying is that deque inherits some behaviors from
container, one of which being that if you convert a container to a bool, it
is True iff the container is not empty. So, there should be something on the
deque page which points to that information.
Explicit is better than implicit :-) |
|
Date |
User |
Action |
Args |
2008-09-20 03:22:10 | roysmith | set | recipients:
+ roysmith, skip.montanaro, georg.brandl, rhettinger, terry.reedy |
2008-09-20 03:22:10 | roysmith | set | messageid: <1221880930.19.0.864950178252.issue3891@psf.upfronthosting.co.za> |
2008-09-20 03:22:09 | roysmith | link | issue3891 messages |
2008-09-20 03:22:09 | roysmith | create | |
|