240
Using comments as arguments in python.
(lemmy.world)
Post funny things about programming here! (Or just rant about your favourite programming language.)
I assume the people freaking out about how dumb python is didn't bother to read the code and have never coded in python in their life, because the behavior here is totally reasonable. Python doesn't parse comments normally, which is what you'd expect, but if you tell it to read the raw source code and then parse the raw source code for the comments specifically, of course it does.
You would never, ever accidentally do this.
...you'd also never, ever do it on purpose.
yeah frankly this post is borderline misinformation, they specifically import a library to read comments as arguments, it's like redefining keywords in C and complaining about C being dumb
I'm going to say it just is misinformation, if that's what "lib" is here.