Boolean tests [was Re: Attack a sacred Python Cow]

Carl Banks pavlovevidence at gmail.com
Tue Jul 29 13:47:01 EDT 2008


On Jul 29, 1:30 pm, Carl Banks <pavlovevide... at gmail.com> wrote:
> On Jul 29, 5:15 am, Heiko Wundram <modeln... at modelnine.org> wrote:
>
> > I can't dig up a simple example from code I wrote quickly, but because of the
> > fact that explicit comparisons always hamper polymorphism
>
> I'm not going to take your word for it.  Do you have code that
> demonstrates how "if x" improves polymorphism relative to simple
> explicit tests?

And, in case it wasn't obvious, the way to demonstrate that "if x"
improves polymorphism relative to simple explicit tests would be
posting an example where "if x" works but a simple explicit test
doesn't.  So don't accuse me of changing the question on you: it's the
same question.

You see, what you are stating and expecting me to take for granted is
exactly what I'm asking for a concrete example of.


Carl Banks



More information about the Python-list mailing list