Arnaud Delobelle wrote:
Dave Angel writes:
Python allows multiple assignments in the same statement, but they're
all to the same object.
Unless they are to different objects:
a, b = 1, 2
You're right, of course. I was referring to the multiple '=' form, and
my statement wa
Dave Angel writes:
> Python allows multiple assignments in the same statement, but they're
> all to the same object.
Unless they are to different objects:
a, b = 1, 2
--
Arnaud
--
http://mail.python.org/mailman/listinfo/python-list
Tobias Weber wrote:
Hi,
being new to Python I find remarkable that I don't see any side effects.
That's especially true for binding. First, it is a statement, so this
won't work:
if x = q.pop():
print x # output only true values
Second, methods in the standard library either return
> But I'm used to exploiting side effect, and sometimes forget this rule
> in my own classes. IS THERE A WAY to have the following produce a
> runtime error?
>
>def f():
> x = 5
> # no return
>
>y = f()
Typically, this will produce a runtime error fairly quickly,
namely whe
Tobias Weber a écrit :
Hi,
being new to Python I find remarkable that I don't see any side effects.
That's especially true for binding. First, it is a statement, so this
won't work:
if x = q.pop():
print x # output only true values
Second, methods in the standard library either retu