Why does 1**2**3**4**5 raise a MemoryError?

Chris Angelico rosuav at gmail.com
Sun Mar 31 20:58:18 EDT 2013


On Mon, Apr 1, 2013 at 11:39 AM, Alex <foo at email.invalid> wrote:
> Given that
>
>   3
>  5
> 4
>
> (i.e.: 4**5**3) is transitive, I would have expected Python to exhibit
> more consistency with the other operators. I guess that is one of the
> foolish consistencies that comprise the hobgoblins of my little mind,
> though.

Not sure what you mean by transitive here. Certainly (4**5)**3 and
4**(5**3) are not the same value.

ChrisA



More information about the Python-list mailing list