mdw at distorted.org.uk
Sun Nov 14 00:40:36 CET 2010
Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:
> On Sat, 13 Nov 2010 21:42:03 +0000, Mark Wooding wrote:
> > Dave Angel <davea at ieee.org> writes:
> >> No, an (=) assignment is always an assignment.
> > No. In `foo = bar' it's a method call in disguise.
> How does that imply that can't also be an assignment?
Is `splat(34)' an assignment? If so, I think the term's meaning is
grievously diluted. I'd rather say that `splat(34)' might mutate a
value, or have side effects, and reserve the term `assignment' for the
job of explaining how variables work. That seems pretty tricky, because
we're arguing about it a lot, so I think we need sharply defined
concepts so that we don't get more confused than we have to be.
> Of course, you're correct that it's not *necessarily* an assignment,
> I don't think it helps to overload newbies struggling with the basics
> with such pathological cases though.
I think that we're better off giving `newbies' a conceptual framework
which is robust, so that they can understand pathological situations
when they occur.
More information about the Python-list