Programmer meme

76 points · 3 comments · view on lemmy.world

3 Comments

JohnnyCanuck@lemmy.ca · 16 pts · 352d
import inspect, builtins

def HelloWorld(funcname):
    caller = inspect.currentframe().f_code.co_name
    getattr(builtins, funcname)(caller)

HelloWorld("print")
TDCN@feddit.dk · 10 pts · 352d

It took my brain way longer than I want to admit to figure out, what is wrong with that line... I gues my brain just autocorrected it for me without me even knowing.

strung6387@lemmy.ml · 2 pts · 351d

That is some serious dependency inversion.