Apologize if this is a duplicate, tried searching. I understand that everything in python is a data type, but this is what I'm a bit confused about. So everything is an object, we have the collection class, integer, float, and other classes as children of the parent object class thinking of it as a tree of objects with say lists, tuples, and dictionaries as a child to the collection class.
So when we arbitrarily create our own data type class and defining the specific types of children / data types it will be able to handle, are we just redefining what python already has implemented? For example, say we create our own data class to handle list using the super() method and then specify that only integers could be placed into this list or strings, or whatever we may wish to be contained within this data type.
Sorry if this question is a bit confusing tried to word it as precisely as I could.
NewListclass, and even typelist = NewList, but you can't replace the "real"listclass or change how literals like[1,2,3]are treated.