[Tutor] short circuiting

2009-06-25 Thread Dave C
Hi
I've read that the builtin all() function stops evaluating as soon as
it hits a false item, meaning that items after the first false one are
not evaluated.

I was wondering if someone could give an example of where all()'s
short circuiting is of consequence, akin to:

False and produces_side_effect()

Many thanks
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] trying to figure out what this means

2007-05-07 Thread Dave C

when you are doing print these two characters keep showing up in this book
"%s" %

What do they do?

here is example of complete command.

print "%s" % last_names[-2]

Thank you,

Dave
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor