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

MRAB python at mrabarnett.plus.com
Wed Aug 17 15:39:34 EDT 2016


On 2016-08-17 19:00, Grant Edwards wrote:
> On 2016-08-17, MRAB <python at mrabarnett.plus.com> wrote:
>
>> C uses "->" for dereferencing a pointer to the member of a struct.
>>
>> If "p" points to a struct (record), then "*p" is that struct, and if
>> that struct has a member (field) "m", then that member can be accessed
>> by "(*p)->m" (the parens are necessary because of the operator
>> precedence).
>
> ITYM (*p).m
>
Correct.

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




More information about the Python-list mailing list