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.
- 
				
				 orhun11946yIt's something that we can't understand fellas. Something big. Something out of this world. orhun11946yIt's something that we can't understand fellas. Something big. Something out of this world.
 
 Enough with the joke. WTF?
- 
				
				Diabetus76y@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






 No questions asked
No questions asked As a Python user and the fucking unicode mess, this is sooooo mean!
As a Python user and the fucking unicode mess, this is sooooo mean!
 I just started working on a little project to browse devrant from terminal. It converts images to ascii art!
I just started working on a little project to browse devrant from terminal. It converts images to ascii art!
I just found this grandiose function in our code
```
def t(s):
return s
```
rant
function
python