Sometimes I use classes without any structure, i.e.
class Foo(object):
    pass
foo = Foo()
I wonder if there is a more compact way which avoids the clumsy, meaningless definition. Can one directly initialize blank object-instances?
foo = object()
is the common way.
object instances, like foo in this example. If you just need a unique object (for instance, as a sentinel value), this is a good way to go, but if you need to be able to store data in the object it won't work.foo1=object() and foo2=Foo() behave different, even though the Foo class got no additional ingredients. Is there a deeper reason for this strange behavior? Is object really a class or something spooky nonstandard?object is a built-in class.