I am new to python. I have a few questions coming from an armature!

Lawrence D’Oliveiro lawrencedo99 at gmail.com
Wed Aug 17 19:05:22 EDT 2016


On Thursday, August 18, 2016 at 5:53:14 AM UTC+12, MRAB wrote:

> C uses "->" for dereferencing a pointer to the member of a struct.

The only reason why “s->f” was added was because “(*s).f” was considered an unwieldy thing to have to write all the time.

And the only thing that made that unwieldy was that pointer dereferencing was a prefix operator, rather than postfix as in Pascal.

> Pascal, on the other hand, dereferences with a postfixed "^", so that 
> would be "p^.m".

And you will notice that nobody felt the need for an alternative form to abbreviate that.



More information about the Python-list mailing list