Chris Spencer a écrit : > Bruno Desthuilliers wrote: > >> And *this* is highly unpythonic. And un-OO too, since it makes foo() >> dependant on *class* Bar, when it should most probably be enough that >> it only depends on (probably part of) the *interface* of class Bar. > > I was providing the original poster with a simple way to ensure > appropriate type.
s/appropriate type/specific implementation/ Hint : the appropriate type for print >> XXX is "whatever has a 'write(anything_that_can_be_coerced_to_a_string)' method". -- http://mail.python.org/mailman/listinfo/python-list