[Cython] Assignment nodes, buffers and transforms
Stefan Behnel
stefan_ml at behnel.de
Wed Jul 23 20:23:34 CEST 2008
Hi,
Johannes Wienke wrote:
> Am 07/23/2008 07:30 PM schrieb Stefan Behnel:
>> Johannes Wienke wrote:
>>> Am 07/23/2008 07:07 PM schrieb Stefan Behnel:
>>>> I disagree with option 2. A statement like
>>>>
>>>> a = b = xyz
>>>>
>>>> is very clearly asking for "xyz" being evaluated once
>>> To my mind such a statement should be a syntax error. It's like a
>>> roulette game figuring out what's going on here and it isn't much more
>>> complicated to write this in two readable lines.
>> Wrong list, try python-ideas.
>>
>> (although I doubt you'll get much applause over there...)
>
> Was only my first thought while this discussion that could simply be
> avoided. ;) But if python has this feature, then there should already be
> a semantic that cython should implement?
:) this isn't about semantics (which Python defines for us). It's about
deciding which code should be generated out of the options that provide
equivalent semantics (aka optimisation). In my above quote, "evaluated" does
not refer to user code but to type conversions that Cython injects at the C level.
Stefan
More information about the Cython-dev
mailing list