functions, list, default parameters
Robert Kern
robert.kern at gmail.com
Mon Nov 8 18:53:56 EST 2010
On 11/8/10 5:24 PM, Lawrence D'Oliveiro wrote:
> In message<mailman.608.1288889032.2218.python-list at python.org>, Robert Kern
> wrote:
>
>> On 11/4/10 2:07 AM, Lawrence D'Oliveiro wrote:
>>
>>> In message<mailman.504.1288718704.2218.python-list at python.org>, Robert
>>> Kern wrote:
>>>
>>>> On 11/2/10 2:12 AM, Lawrence D'Oliveiro wrote:
>>>>
>>>>> In message<mailman.475.1288670833.2218.python-list at python.org>, Robert
>>>>> Kern wrote:
>>>>>
>>>>>> "Immutable objects" are just those without an obvious API for
>>>>>> modifying them.
>>>>>
>>>>> They are ones with NO legal language constructs for modifying them.
>>>>> Hint: if a selector of some part of such an object were to occur on the
>>>>> LHS of an assignment, and that would raise an error, then the object is
>>>>> immutable. The interpreter already knows all this.
>>>>
>>>> Incorrect. RHS method calls can often modify objects.
>>>
>>> So bloody what?
>>
>> So examining LHS "selectors" is not sufficient for determining
>> immutability.
>
> Yes it is. All your attempts at counterexamples showed is that it is not
> necessary, not that it is not sufficient.
file objects. hashlib hash objects. weakref.ref objects.
Again, I ask you to point out a piece of code in the interpreter that makes this
determination. You have repeatedly claimed that they exist, but you have not
produced a single example.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list
mailing list