On Thu, Sep 17, 2020 at 1:39 PM Eric V. Smith <e...@trueblade.com> wrote:
> On 9/17/2020 1:28 PM, Ricky Teachey wrote: > > > > On Thu, Sep 17, 2020 at 1:13 PM Eric V. Smith <e...@trueblade.com> wrote: > >> >> >> If someone wanted to play with this in pure Python, string.Formatter's >> parse() method would do all of the parsing for you. >> > > Surprisingly it is not *quite* all. The format specification mini language > parser is not exposed for use. This has bummed me out more than once in the > past. > > Yeah, I've considered exposing this from the C code, but was never super > motivated about it. I go back and forth trying to decide if it's a bad idea > or not. > This is a fantastic idea! > ... The leading underscores should give you an idea of just how > unsupported this is! But as far as I know, it works. > > Eric > Probably should add a few more just to be safe. --- Ricky. "I've never met a Kentucky man who wasn't either thinking about going home or actually going home." - Happy Chandler
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/ZHGWDUB5XKZ3S7PZ2PJRPSRGVLLZOP7B/ Code of Conduct: http://python.org/psf/codeofconduct/