Giter Club home page Giter Club logo

Comments (6)

tbennun avatar tbennun commented on May 24, 2024

The assertion is correct. It checks for different regular expressions, and if there is no match continues to the next one. If the last check fails, then check is None and the assertion should fail. In any other case, the check is successful and execution should continue.

Why do you think it should be the opposite?

from ncc.

island255 avatar island255 commented on May 24, 2024

I think that if it goes to the branch if arg_list_ is None: , that check must be None (as it found no "( )"). And assert will meet False and assertion will fail.

But in this case, assertion in this brach will always fail. Does it mean that this brach should just not be executed?

from ncc.

island255 avatar island255 commented on May 24, 2024

Or it is the debug code left after testing the function find_outer_most_last_parenthesis. If it is that case, I understand it and the comments there. When I first see it, I just got confused and didn't realize the meaning of this code.

from ncc.

tbennun avatar tbennun commented on May 24, 2024

Yes, the assertion and regexp in the branch is a sanity check meant to make sure that find_outer_most_last_parenthesis didn't miss an empty argument list somewhere.

from ncc.

island255 avatar island255 commented on May 24, 2024

Thanks for your reply! Thanks for your outstanding work! I really learn a lot from it.

from ncc.

tbennun avatar tbennun commented on May 24, 2024

Happy to help :)

from ncc.

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.