Metacode: The new standard for machine-readable comments for Python
Posted by pomponchik 6 days ago
Comments
Comment by pomponchik 6 days ago
But you know what? There is no single standard for such comments. Seriously.
The internal implementation of reading such comments is also different. Someone uses regular expressions, someone uses even more primitive string processing tools, and someone uses full-fledged parsers, including the Python parser or even written from scratch.
This is exactly the problem that this library solves. It describes a simple and intuitive standard for action comments, and also offers a ready-made parser that creators of other tools can use.
Comment by degamad 10 hours ago
Comment by AlphaSite 5 hours ago
Comment by jiggunjer 8 hours ago
Comment by crockeo 8 hours ago
You could also imagine other representations of the same data (e.g. one large file which includes annotations, or a binary representation). But in this case you lose colocation with the code they're annotating, so it's more likely to drift.
I fully agree that there are probably better UX's out there for this flow, but the source annotation approach is popular for very good reasons.
Comment by est 9 hours ago
Comment by throwaway290 8 hours ago