[issue24085] large memory overhead when pyc is recompiled

2018-06-02 Thread Jonathan G. Underwood
Jonathan G. Underwood added the comment: Thanks to both Serhiy Storchaka and David Murray - indeed you're both correct, and that is the issue in 21074, and the workaround from there of declaring a variable for that size fixes the pr

[issue24085] large memory overhead when pyc is recompiled

2018-06-02 Thread Jonathan G. Underwood
Jonathan G. Underwood added the comment: Seeing a very similar problem - very high memory useage during byte compilation. Consider the very simple code in a file: ``` def test_huge(): try: huge = b'\0' * 0x1 # this allocates 4GB of memory! except M

[issue9037] Add explanation as to how to raise a custom exception in the extending python intermezzo on exceptions

2010-06-20 Thread Jonathan G. Underwood
New submission from Jonathan G. Underwood : In the documentation section on Extending Python with C or C++ there is an Intermezzo on Errors and Exceptions which shows how to create a custom exception in an extension module. I was just following these instructions for the first time and got to