diff options
| author | Olly Betts <olly@survex.com> | 2018-05-19 11:47:23 +1200 |
|---|---|---|
| committer | William S Fulton <wsf@fultondesigns.co.uk> | 2018-10-12 07:10:47 +0100 |
| commit | 728b8955bd50d79168e121f834295ef30fcdc89e (patch) | |
| tree | 63b3d81e24738a2d485de205b052ab578e480c1d /Examples/python/exceptproxy | |
| parent | dcbccc6f6f83fa41484b99c4de1fb9df514a4dab (diff) | |
| download | swig-728b8955bd50d79168e121f834295ef30fcdc89e.tar.gz | |
Drop support for Python classic classes
There were only needed to support Python < 2.2, and we now require at
least Python 2.6.
Conflicts:
.travis.yml
Examples/test-suite/python/autodoc_runme.py
Source/Modules/python.cxx
This is a cherry-pick and merge from patch in #1261
Diffstat (limited to 'Examples/python/exceptproxy')
| -rw-r--r-- | Examples/python/exceptproxy/example.i | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Examples/python/exceptproxy/example.i b/Examples/python/exceptproxy/example.i index f5f835149..4ad960845 100644 --- a/Examples/python/exceptproxy/example.i +++ b/Examples/python/exceptproxy/example.i @@ -59,15 +59,15 @@ */ /* - Now, the EmptyError doesn't appear in a throw declaration, and hence - we need to 'mark' it as an exception class. In python, classes that - are used as exception are 'special', and need to be wrapped as - 'classic' ones. - - This is a python issue, and if you don't mark the class, you will - see 'interesting' behaviours at the python side. - - + Python classes that are used as exceptions need to be subclasses of the + "Exception" class, and so SWIG needs to know which wrapped classes may be + used in this way. You can explicitly tell SWIG this by using + %exceptionclass. SWIG will implicitly set this feature for classes which + appear in a throw declaration, but it's not a problem to explicitly + mark such classes as well. + + This is a Python requirement - if you fail to mark such classes with + %exceptionclass you may see 'interesting' behaviour on the Python side. */ %exceptionclass EmptyError; %exceptionclass FullError; |
