• 0 Posts
  • 17 Comments
Joined 6 days ago
cake
Cake day: September 21st, 2024

help-circle
  • I would do

    class MyClass:
        def __init__(self, value):
            self._whatever = value
    
        @property
        def whatever(self):
            return self._whatever
    

    Personally, I would type hint all of that but I’m just showing how you can do it without types. Your linter should be smart enough to say “hey dumbass did you mean this other thing”? Also since we didn’t create a setter you can’t arbitrarily overwrite the value of whatever so thats neat.

    And I’ll just say before I post that I’m on mobile and I’m sorry if the formatting is fucked. I’m not going to fix it.








  • OK well we’re talking in generalities here. Most people who have a Truck (myself included) don’t need one. And I’d bet that a lot of those who do would be better served by a utility van or something similar.

    Trucks aren’t even the only vehicle capable of hauling large loads (giggity).

    Sure, some people legitimately need a truck. We’re not talking about them.

    Absolutely zero people need the pedestrian slaughterer 2000, but these kinds of trucks killing machines are more and more common on the road today.