Decoratored functions parsed differently by ast stdlib between 3.7 and 3.8

Mike Lee Williams mjwilliams at gmail.com
Fri Apr 30 23:07:50 EDT 2021


On Friday, April 30, 2021 at 7:55:10 PM UTC-7, Mike Lee Williams wrote:
> This trivial bit of code is parsed differently by the ast module between python 
> 3.7 and python 3.8. I'm trying to figure out what changed and why, and once I 
> know that, if it's possible and desirable to retain the 3.7 behavior for my use 
> case (which needs to give the same result for this input on 3.7 and 3.8). 

Answering my own question: the behavior was changed by https://github.com/python/cpython/pull/9731.


More information about the Python-list mailing list