Re: [Python-Dev] Multiple expression eval in compound if statement?

Skip writes:
Even an apparently simple variable can have side effects [...] Consider the builtin help object. Type it at the prompt with no parens.
I tried. As far as I can tell, the result (in the interactive interpreter) is the same as with any other object except None: the _ variable gets set, the interpreter prints out the __str__ of the object, sets the _ variable, and prints a new '>>>' prompt. It happens that the __str__ of the help object is: 'Type help() for interactive help, or help(object for help about object.' ... but if there's some side effect going on here, I don't see it. What am I missing? -- Michael Chermside

Michael> ... but if there's some side effect going on here, I don't see Michael> it. What am I missing? Mea culpa. I was thinking of the print as a side efefct. Obviously mistaken. Skip
participants (2)
-
Michael Chermside
-
Skip Montanaro