Closed samwaseda closed 1 month ago
Coverage variation | Diff coverage |
---|---|
:white_check_mark: +0.93% (target: -1.00%) | :white_check_mark: 100.00% |
Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more
Totals | |
---|---|
Change from base Build 11076924624: | 0.4% |
Covered Lines: | 72 |
Relevant Lines: | 74 |
Following this discussion I finally realized what I had in mind, even though I have to admit it might not work exactly in the way I wish it would.
For this class:
I get the following behaviour:
Output:
The only one problem is that the default value is lost when there is one and it's accessed without instantiating the class, i.e.
Output:
But it doesn't really interfere with any functionality if it's instantiated. This being said, I would have loved to do it without overwriting the class, but I couldn't find any viable solution other than this one.