284
Using comments as arguments in python.
(lemmy.world)
Post funny things about programming here! (Or just rant about your favourite programming language.)
Yeah. 'lib' isn't a standard Python library, it's the name of the abomination that this person created. Since python has quite a bit of useful introspection, they can do something like:
abomination.add()
Now, I don't know if python keeps the comments around, so it may involve getting the filename and line number, reading the file, and manually extracting the comment text from that line.
It's not even actually called lib. The line just straight up isn't in the image "transcribed", and it's
from arglib import comment_arguments
in the original code.Yeah, I gave this one a downvote.