I have created a class like this:
class test:
def __init__(self, this_uuid=uuid.uuid4().hex):
self.this_uuid = this_uuid
When I instantiate it without parameters and print the this_uuid value like this:
t = test()
print t.this_uuid
The values I get are not random, in fact if I do it two or three times in a row spaced several seconds apart I get the same one. Can someone explain this behavior to me? If the uuid is not made in the constructor parameters it is random. This is on python 2.7.