Open harleypig opened 2 years ago
To fix this, Python 3.8 added positional-only parameters:
def __init__(self, content, hander, /, **metadata);
...
I've thought about that. Not sure I'm ready to drop Python 3.7 just yet, but it's an option.
What about __init__(_self, _content, _handler, **metadata)
then?
Or alternatively metadata
as a dict, without kwarg unpacking?
The first option is probably better. Second would break backwards compatibility, and I'd rather not do that if I can avoid it.
Also, Python 3.7 has almost a year until EOL, so can't do positional-only arguments just yet.
If I have a file with
content
as a key in the frontmatter, frontmatter dies a horrible death.Example markdown file (
test.md
):Example python file (
badkey.py
):When running
python badkey.py
you get: