Function That Sleeps Instead of Adding
from time import sleep, time def add(num1, num2): """ adds two positive integers """ start = time() sleep(num1) sleep(num2) return int(time() - start)
A Python function named add is supposed to add two positive integers, but instead it waits for each number of seconds and returns the elapsed time. The joke is that the function technically produces the sum through an absurdly inefficient method, poking fun at overcomplicated programming. EN: A Python function named add is supposed to add two positive integers, but instead it waits for each number of seconds and returns the elapsed time. The joke is that the function technically produces the sum through an absurdly inefficient method, poking fun at overcomplicated programming.
- @gentoomemes / 1248 2022-11-16
- @gentoomemes / 2915 2023-03-10
- @right_wing_dev_squads / 9899 2024-06-23
- Type
- image
- Size
- 712×532 · 25.3 KiB
- Mood
- absurd, sarcastic
- Language
- en
- Added