object types, mutable or not?
Ned Batchelder
ned at nedbatchelder.com
Wed May 16 11:03:06 EDT 2018
On 5/16/18 10:06 AM, Steven D'Aprano wrote:
> On 2018年5月16日 09:23:02 -0400, Ned Batchelder wrote:
>>> I've also experimented with different ways to better say "everything is
>> an object". One possibility is, "any right-hand side of an assignment
>> is an object," though that is a bit tortured.
> What if there's no assignment?
>>> Now I'm thinking of trying, "Any piece of data is an object."
> Is None data? How about True and False?
>> Surely object() isn't data... and if it is, what about len?
>This is what I meant by the complication when you get to a deeper
discussion of all the possible kinds of Python values. I think even
beginners would consider True and False as data. The others take more
explanation.
--Ned.
More information about the Python-list
mailing list