Terminology: "reference" versus "pointer"

Chris Angelico rosuav at gmail.com
Sun Sep 13 21:30:43 EDT 2015


On Mon, Sep 14, 2015 at 11:22 AM, Akira Li <4kir4.1i at gmail.com> wrote:
> Steven D'Aprano <steve at pearwood.info> writes:
>
>> On Mon, 14 Sep 2015 09:17 am, Akira Li wrote:
>>
>>> I don't see why the model that can't describe range(1) in Python 3
>>> pretends to be complete.
>>
>>
>> Please explain.
>>
>> range(1) returns a range instance. What is hard about that?
>
> Look at the last example:
> http://thread.gmane.org/gmane.comp.python.general/782626/focus=782704

Still not sure what the problem is. As per Python's object model, the
lists contain references to range objects. a contains two references
to the same range object, b contains references to each of two
distinct range objects. What of it?

ChrisA



More information about the Python-list mailing list