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
-
Easier to change function return unchanged input value than to remove its use from all code.
-
I did something similar yesterday but with a lambda. I needed to add an optional post processing function as an argument to another function but I hate None defaults as they add that ugly "if x is None" boilerplate, so my default post processing function was an identity function "lambda x: x". That should be built-in IMO.
-
orhun12475yIt's something that we can't understand fellas. Something big. Something out of this world.
Enough with the joke. WTF? -
Diabetus75y@Khepu I think all languages with first class functions have a built in identity function
-
Usefull in very specific cases, where methods are overridden, or bound to intances in runtime.
Also usefull for monkey patching runtimes.
Related Rants
I just found this grandiose function in our code
```
def t(s):
return s
```
rant
function
python