This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mjpieters
Recipients mjpieters
Date 2017-05-06.19:04:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The following expression produces 127MB in constants in `co_consts` due to two 63.5MB integer objects produced when folding:

    ((200*200 - 2) & ((1 << 500000000) - 1)) + ((200*200 - 2) >> 500000000)

The optimizer already does not store optimized *sequences* of more than 20 elements to avoid making bytecode files too large:

   If the new constant is a sequence, only folds when the size
   is below a threshold value.  That keeps pyc files from
   becoming large in the presence of code like:  (None,)*1000.

Perhaps the same should be extended to number objects?

Date User Action Args
2017-05-06 19:04:17mjpieterssetrecipients: + mjpieters
2017-05-06 19:04:17mjpieterssetmessageid: <>
2017-05-06 19:04:17mjpieterslinkissue30293 messages
2017-05-06 19:04:17mjpieterscreate