In article <50038364$0$29995$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: >On Sun, 15 Jul 2012 18:21:06 -0700, Ranting Rick wrote: > >> If HOWEVER we want to "truth test" an object (as in: "if obj") we should >> be FORCED to use the bool! Why? Because explicit is better than implicit > >And this is why Rick always writes code like: > >integer_value_three = int(1) + int(2) >assert (int(integer_value_three) == \ > int(3) is True) is True, str("arithmetic failed") >list_containing_three_values_which_are_all_integers_but_might_later_have_more_or_fewer_values_or_other_types > = list([1, 2, integer_value_three]) > >because you can never have too much explicitness. Who wouldn't want >to read code like that?
Java programmers? (Couldn't resist ;-) ) >-- >Steven Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- http://mail.python.org/mailman/listinfo/python-list