Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Not sure if joking or not.
The facts:
1) everyone: "python is so great there is no better language"
2) it has a slow abs func, which could be a joke because
3) your error message is ridiculous
1 and 2 are not compatible, 3 makes it even weirder.
What the heck is going on. -
Conrad7327yLol don't you just have to flip one bit that tells the number whether it's positive or negative?
Related Rants
Hey everyone. I decided to rewrite python's abs() function, as it's really slow. Here is my new and improved version. It's up to 500% faster!!!
def abs(int=None):
if not int is None:
try:
lnt = math.sqrt(int);
lnt = math.pow(lnt, 2);
return lnt;
except Exception as E:
lnt = int/-1;
return lnt;
else:
raise ValueError("oopsie whoopsie! uwu we made a fucky wucky!!1 a wittle fucko boingo! the code monkies at our headquarters are working VEWY HAWD to fix dis!!");
Edit: devrant fucked up the indention.
Here is a hastebin instead:
https://hastebin.com/iyajuyoxuq.pl
joke/meme
bad code
python
abs