On Sunday, February 23, 2014 5:01:25 AM UTC-6, Marko Rauhamaa wrote:
> Chris Angelico <[email protected]>:
>
> > That's the exact line of thinking that leads to problems. You are not
>
> > placing a number at the address "xyz", you are pointing the name "xyz"
>
> > to the number 3. That number still exists elsewhere.
>
>
>
> And?
>
>
>
> In C, I can say:
>
>
>
> Number *o = malloc(sizeof *o);
>
> o->value = 3;
>
>
>
> Your statement is valid: the number 3 resides elsewhere than the
>
> variable o.
typedef struct {
int value;
} Number;
Number *o;
o = malloc(sizeof(*o));
o->value=3;
printf("o<%p>, o->value<%p>\n", o, &o->value);
o<0x9fe5008>, o->value<0x9fe5008>
Is the compiler borked?
--
https://mail.python.org/mailman/listinfo/python-list