Skip to main content
6 events
when toggle format what by license comment
Feb 26, 2018 at 20:27 comment added Leonid Shifrin @Kuba Sounds good. Feel free to edit my answer and add your changes.
Feb 26, 2018 at 19:32 comment added Kuba Yes it does, and thanks for the comment. I need it for my lightweight error handling. I needed to modify $multiPattern because currently it matches {} with Repeated which should not happen. And since I'm on it I will probably add Matched[Missing] to the family.
Feb 26, 2018 at 19:29 comment added Leonid Shifrin @Kuba The funny thing is that I completely forgot about this answer, which actually looks quite useful also for some of the things I do.
Feb 26, 2018 at 19:28 comment added Leonid Shifrin @Kuba A cursory look at the code above suggests that MatchQ might not be ideal, because KeyValuePattern is somewhat permissive. The match function above, performs stricter matching, and validate simply inspects the result of match for failures. Also, validate can easily be modified to provide a more detailed information about the parts that didn't match, which I didn't do here, but which was your original motivation for match.
Feb 26, 2018 at 8:12 comment added Kuba Don't bother answering if this was too long ago but maybe you recall what is the point of validate if one can just MatchQ[expr, patt]?
Jun 3, 2016 at 16:02 history answered Leonid Shifrin CC BY-SA 3.0