bpo-34100: Merge constants recursively by methane · Pull Request #8341 · python/cpython

@methane

There are some same consts in a module. This commit merges them into
single instance. It reduces number of objects in memory after loading modules.

https://bugs.python.org/issue34100

asottile

Choose a reason for hiding this comment

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

didn't really review the code -- sorry about the drive-by!

@methane methane changed the title bpo-34100: compile: Merge constants bpo-34100: Merge constants recursively

Sep 13, 2018

vstinner

Choose a reason for hiding this comment

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

I like the overall idea. But I don't have the bandwidth to review reference counting and other subtle details.

@methane

@methane

vstinner

Choose a reason for hiding this comment

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

@methane

vstinner

@methane

vstinner

Choose a reason for hiding this comment

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

LGTM.

@methane

Thank you for review.

... Travis seems very unresponsible...

@miss-islington

@methane: Status check is done, and it's a success ✅ .