It is possible to go about creating lists like this:
l = list()
l.append(1)
however the most common method is to create a list like this:
l = [1]
My question is simple in the concept but probably extremely complicated in the answer but how is it that the list is created with a notation outside the usual class notation?
I have looked through the source code at https://github.com/python/cpython/blob/master/Objects/listobject.c and cant find where it defines the list notation [].
I am not asking about the difference between [] and list() - I am asking why you can use [] at all. How is it possible that this object is created differently from other objects?