OP suggested that linters for python won’t catch attribute errors, which they 100% will if you use type hints, as you should.
What happens at runtime is really relevant in this case.
OP suggested that linters for python won’t catch attribute errors, which they 100% will if you use type hints, as you should.
What happens at runtime is really relevant in this case.
class MyClass:
def __init__(self, x: int):
self.whatever: int = x
def foo(x: MyClass) -> int:
return x.whatevr
Any decent IDE would give you an error for unresolved attribute. Likewise it would warn you of type error if the type of x.whatever
didn’t match the return type of foo()
And then the other half of the Internet cries about how all they do are lazy remasters.
Accurate?
No. Different genre at this point
The author pointed out how exceptions are often faster than checking every value. If your functions throws an error often enough that Exception handling noticeably slow down your program, surely you got to take a second look at what you’re doing.
They both have their place. I just recently discovered a bug in lemmy bot I wrote where the lemmy API module will raise an Exception if login fails (response status code != 200), which feels extremely out of place, as the error/status code do matter in that case.
Other times exceptions make more sense as Phillip pointed out.
It’s easier faster to ask for forgiveness than permission after all.
I can’t remember ever having used meta critic to guide a purchase. There is so much content both from forums and YouTube/Twitch that gives you much more accurate impressions of games. Meta critic seems rather pointless nowadays.
Children probably
The spring and summer is pretty good in Norway. Several weeks with 20+ weather and sunshine. It’s maybe more unstable on the west coast, but Norwegian summers are easily better than the heat wave summers you see south in Europe.
Expected to see the stave church that one black metal band member burned down just to spread misery
Harrison Ford recently said he always knew that he was a replicant. He didn’t say it in the start since he felt Deckard would want to believe he was human
Both the director and actor have confirmed it though
I guess it depends on your reference yeah. In the movies he was a replicate
Ubisoft are
- The format works for both lossy and lossless compression, depending on the use case and need. Photographs can be encoded in a lossy way much more efficiently than JPEG and things like screenshots can be losslessly encoded more efficiently than PNG.
Someone made a fair point that having a format being both lossy and lossless is not necessarily a great idea. If you download a jpeg file you know it will be compressed, if you download png it will be lossless. Shifting through jxl files to check if it’s lossy or not doesn’t sound very fun.
All in all I’m a big supporter of jxl though, it’s one of the only github repos I actively follow.
I don’t want to get into an Internet argument over pedantry. Linter is often used as a catch-all term for static analysis tools.
Wikipedia defines it as
Catching type errors and attribute errors would fit under this description, if you use a different, more precise definition at your workplace, cool, then we just have different definitions for it. The point is that your IDE should automatically detect the errors regardless of what you call it.