Does the object keyword have any uses except for classes like:
class HelloWorld(object):
pass
Because when assigning a variable to object it seems as if there is no use for it (no variable.__dict__ or anything).
for example:
x=object()
x.anything="foo"#<----- throws an error
One possible use is for sentinel values – things that you want to have unique values that can’t be duplicated by accident. For instance:
Because every object instance has a unique identity, the
ifstatement’s condition will only be true if the user didn’t pass in a value (unlike the common default value for a parameter,None, which the user might pass in to some functions).