Hi all, I've had some more interesting thoughts on the design. One of the more fruity ideas I had was to do with the constructors. Unfortunately, and I have definitely said this before :laughing:, python does not support overloading. I will spare you the details, but the result is that functions, and in particular constructors, can become clogged with logic. Our scenario is not particularly troublesome, but I've concocted an interesting method for implementing multiple constructors that I thought I would share.
Hi all, I've had some more interesting thoughts on the design. One of the more fruity ideas I had was to do with the constructors. Unfortunately, and I have definitely said this before :laughing:,
python
does not support overloading. I will spare you the details, but the result is that functions, and in particular constructors, can become clogged with logic. Our scenario is not particularly troublesome, but I've concocted an interesting method for implementing multiple constructors that I thought I would share.Correct use of this class is:
I think this is pretty cool, but I am curious what other people think.