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

Chris Angelico rosuav at gmail.com
Wed Aug 17 19:18:29 EDT 2016


On Thu, Aug 18, 2016 at 9:13 AM, Dennis Lee Bieber
<wlfraed at ix.netcom.com> wrote:
> On Wed, 17 Aug 2016 18:52:22 +0100, MRAB <python at mrabarnett.plus.com>
> declaimed the following:
>
>
>>
>>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). This can be abbreviated to "p->m".
>>
>
>         I'd have to test, but I think
>
>         (*p).m  is what is equivalent to        p->m
>
> IE; dereference the pointer, and then access the member of the struct

Folks, read the whole thread before posting :) This was a simple error
that has already been mentioned earlier in the thread. (Sorry to
single you out, Dennis - I'm not trying to hate on you personally
here.)

ChrisA



More information about the Python-list mailing list