On Wed, Oct 13, 2010 at 3:53 PM, Ethan Furman wrote:
> Ian Kelly wrote:
>
>> here is an example
>> where the order of assignment actually matters:
>>
>> >>> d['a'] = d = {}
>> Traceback (most recent call last):
>> File "", line 1, in
>> NameError: name 'd' is not defined
>> >>> d = d['a'] =
Ethan Furman writes:
> Ah! I was thinking the assignments went in a filter fashion, but now
> what I think is happening is that the first item is bound to the last,
> then the next item is bound to the last, etc, etc.
>
> Is this correct?
Assignment is always the same direction: the rightmost o
Thank you George Sakkis for your fast and accurate answer. In my life I
am encountering lot of graph-based solutions to my problems. I'll try
to implement your solution as soon as possible.
Fredrik Lundh>working on a Python to C/C++ translator without knowing
what kind of optimizations a C/C++ co
[EMAIL PROTECTED] wrote:
> I don't know if C++ compilers can do such optimizations.
working on a Python to C/C++ translator without knowing what kind
of optimizations a C/C++ compiler can do for you sounds like a great
way to waste your time...
(I would be rather bit surprised if any contemporar
<[EMAIL PROTECTED]> wrote:
> [snipped]
>
> Do you know some algorithm (or you can give some suggestions) to
> minimize the number of simple assignments needed for a "regular"
> situation like that?
You can formulate the task as a graph-theoretic problem by representing the set
of assignments as