Code Monkey home page Code Monkey logo

Comments (4)

jenisys avatar jenisys commented on August 15, 2024

@njwhite
You mean parentheses, like '(' and ')', I think.

The parse module needs to be aware how many groups are in the regex-pattern for user-defined types. This is a functionality that is currently missing in parse. The parse_type has a drop-in replacement for the parse module with this functionality. This is needed to be able to compose generic types and their patterns with parse.

from parse_type import parse
def a(a):
    return a
a.pattern = '((3))'
a.group_count = 2
...

@r1chardj0n3s
Maybe it make senses to add this functionality to parse ?
Otherwise, the group count could be discovered from the user-type pattern expression (maybe) ?!?

SEE ALSO:

from parse.

r1chardj0n3s avatar r1chardj0n3s commented on August 15, 2024

Yeah, if parse_type has solved this issue (I'm not actually sure what it is, at first glance, sorry!) then absolutely, the functionality should be added to parse! I've been meaning to ask about what features in parse_type should be core to parse, but keep getting side-tracked... sorry!!!

from parse.

jenisys avatar jenisys commented on August 15, 2024

from parse.

richard-reece avatar richard-reece commented on August 15, 2024

Thanks for the patch @jenisys! I've made some notes (from my work account because I've struggled to find free time to look into this stuff, sorry for the slow response).

from parse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.