I designed a class in Python to do stuffs related to genetic algorithms. I have a method in this class, which should provide a sort of log to keep the track of the populations during the evolution. I mean, I provide the filename as a string argument to this method, and the method should create the log and place things in it. What I want to do is that in the case of setting the filename argument as an optional one (with the default value equal to None) to be able to use the name of the instance of that class as the filename. It makes sense to me because if I run multiple instances of this class I want to be able to save the results in files related to each instance. I know I can get the name of the class through instancename.__class__.__name__ but I want the instancename as a string.