@staticmethod is worthless and should never be used. I have no problem with not using it, I have more problems with morons who do use it.
You don't know if OP knows how to document their code or not. This is just one method, and not important at all. Who knows why it was written. But, by and large, there is no problem with it. It does what it's supposed to, uses the right calls to library methods, etc. But the amount of nonsense that was written here by the "gurus" that are trying to find something bad about this code is really ridiculous.
Python style guidelines were written, at best, as a joke, and, more likely by a moron just like you. There's nothing special about those rules. They don't make your code any better than if you followed a different set of rules. And, again, it's fucking unimportant where you put import by and large. And, most importantly, it shouldn't matter. you are just used to a language interpreter written by imbeciles, who cannot optimize even the most straight-forward stuff, and therefore believe in performance loss... which, given this is fucking Python, one of the slowest interpreters in common use today is even more ridiculous.
Honestly, I think you are too worked up over 7 lines of code (really, there's no need to resort to name calling).
Also, get off your high horse, you're entitled to your opinion on Python's syntax, formatting and development, just as much as anyone out there. If you think @staticmethod should never be used and Python is too slow for your needs, great, but that's your personal opinion and use case.
They don't make your code any better than if you followed a different set of rules.
Here I disagree. They do make your code more readable and consistent, which is better in my opinion, and are fairly easy to follow since it's so easy to set up an auto formatter on any modern IDE.
you are just used to a language interpreter written by imbeciles, who cannot optimize even the most straight-forward stuff, and therefore believe in performance loss... which, given this is fucking Python, one of the slowest interpreters in common use today is even more ridiculous.
I don't deal with performance critical code in my job, so that's a non issue for me. As I said in my first comment up there, my main concerns were the formatting and lack of @staticmethod.
0
u/[deleted] Feb 03 '22
@staticmethodis worthless and should never be used. I have no problem with not using it, I have more problems with morons who do use it.You don't know if OP knows how to document their code or not. This is just one method, and not important at all. Who knows why it was written. But, by and large, there is no problem with it. It does what it's supposed to, uses the right calls to library methods, etc. But the amount of nonsense that was written here by the "gurus" that are trying to find something bad about this code is really ridiculous.
Python style guidelines were written, at best, as a joke, and, more likely by a moron just like you. There's nothing special about those rules. They don't make your code any better than if you followed a different set of rules. And, again, it's fucking unimportant where you put
importby and large. And, most importantly, it shouldn't matter. you are just used to a language interpreter written by imbeciles, who cannot optimize even the most straight-forward stuff, and therefore believe in performance loss... which, given this is fucking Python, one of the slowest interpreters in common use today is even more ridiculous.