Skip to content

re match object group() should be equivalent to group(0) according to Python3 documentation #193

@cefn

Description

@cefn

Trying to port the ijson module to Micropython, I substituted the re module downloaded via upip for the standard re module referenced by ijson.

I found that ijson at line 34 of https://github.com/isagalaev/ijson/blob/master/ijson/backends/python.py relied on the following contract of the match object, by invoking group() with no arguments...

"Without arguments, group1 defaults to zero (the whole match is returned)." ( from https://docs.python.org/3/library/re.html )

Unfortunately the micropython re module doesn't conform. I was able to fix the library by invoking group(0) in the place of group() but ideally the micropython-lib re module would be compliant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions