On Sat, Jul 11, 2015 at 9:54 PM, candide <c.cand...@laposte.net> wrote: > Le samedi 11 juillet 2015 13:31:03 UTC+2, Luuk a écrit : > >> >> But operator precedence of 'not' is higher than of '+' ???? > > > Right but what does this prove? For instance, unary minus has higher > precedence than exponentiation but the expression > > 2 ** -1 > > doesn't raise a syntax error.
You'll see down below a footnote referring to this as a special case. But I don't know the details of how it all works, so short of digging into the source code, I can't explain this any better. There are others on this list who can, I believe. ChrisA -- https://mail.python.org/mailman/listinfo/python-list