A C-like if statement
Steven D'Aprano
steve at REMOVETHIScyber.com.au
Fri Feb 24 04:55:01 EST 2006
On Thu, 23 Feb 2006 20:41:52 -0600, Terry Hancock wrote:
> On Fri, 24 Feb 2006 09:14:53 +1100
> "Steven D'Aprano" <steve at REMOVETHIScyber.com.au> wrote:
>> There are *reasons* why Python discourages functions with
>> side-effects. Side-effects make your code hard to test and
>> harder to debug.
>
> You of course meant "expressions with side-effects". Python
> is pretty good at making functions with side-effects. At
> least it is if you want them. ;-)
Yes, of course I meant that.
However, functions with side-effects are also discouraged. Unless
side-effects are the correct way to do whatever it is you are trying to
do, in which case they are encouraged.
*wink*
--
Steven.
More information about the Python-list
mailing list