Skip to content

Conversation

brandtbucher
Copy link
Member

@brandtbucher brandtbucher commented Apr 29, 2021

This fixes validation of complex literal value patterns in the parser and factors out the old compiler_pattern_capture and compiler_pattern_wildcard routines to better match the current AST.

(A few other cleanups, too.)

https://bugs.python.org/issue43892

Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I checked also for refleaks (although this really doesn't add any new paths were we can leak):

❯ ./python -m test test_patma test_compile test_ast -R : 0:00:00 load avg: 1.71 Run tests sequentially 0:00:00 load avg: 1.71 [1/3] test_patma beginning 9 repetitions 123456789 ......... 0:00:00 load avg: 1.71 [2/3] test_compile beginning 9 repetitions 123456789 ......... 0:00:38 load avg: 1.40 [3/3] test_ast -- test_compile passed in 38.2 sec beginning 9 repetitions 123456789 ......... == Tests result: SUCCESS == All 3 tests OK. Total duration: 1 min 1 sec Tests result: SUCCESS 
@pablogsal
Copy link
Member

pablogsal commented Apr 29, 2021

Thanks for the cleanup, @brandtbucher ! 👌

@brandtbucher brandtbucher merged commit dbe60ee into python:master Apr 30, 2021
@brandtbucher brandtbucher deleted the patma-parser-cleanup branch July 21, 2022 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants