semantics of ** (unexpected/inconsistent?)

inhahe inhahe at gmail.com
Mon Nov 30 13:58:06 EST 2009


On Mon, Nov 30, 2009 at 1:53 PM, Chris Rebert <clp2 at rebertia.com> wrote:
>> On Mon, Nov 30, 2009 at 3:46 AM, Gregory Ewing
>> <greg.ewing at canterbury.ac.nz> wrote:
>>> Esmail wrote:
>>>
>>>> Wow .. never heard of Concatenative_languages languages before or the
>>>> distinction you make. Your distinction explains the behavior, but I
>>>> find it somewhat counter-intuitive.
>>>
>>> You shouldn't find it any more surprising than the fact that
>>>
>>>  a = 2 + 3
>>>  print a * 5
>>>
>>> gives a different result from
>>>
>>>  print 2 + 3 * 5
>
> On Mon, Nov 30, 2009 at 3:41 AM, inhahe <inhahe at gmail.com> wrote:
>> one point of confusion could be the use of ** instead of superscript.
>> it might make things a little bit more counterintuitive-looking than
>> with superscripts, since the issue with
>
> Well, since source code is almost universally just plain ASCII and not
> in some file format with typesetting, superscripts aren't going to
> happen any time soon.
> (Also, avoid top-posting in the future.)
>

i wasn't suggesting it as a feature for python, just pointing out why
it might seem counterintuitive.



More information about the Python-list mailing list