python: improve bdd_dict bindings

Fixes #372.

* python/spot/impl.i: Refactor the handling of exceptions using a
Lippincott function.  Map out_of_range to IndexError.  Add
PyObject* version for bdd_dict's register and unregister functions
so we can use Python objects as well.
* tests/python/bdddict.py: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention the changes.
This commit is contained in:
Alexandre Duret-Lutz 2019-01-14 16:42:30 +01:00
parent bd0f959418
commit 3908cc1bca
4 changed files with 216 additions and 7 deletions

View file

@ -1,6 +1,6 @@
## -*- coding: utf-8 -*-
## Copyright (C) 2009-2018 Laboratoire de Recherche et Développement
## Copyright (C) 2009-2019 Laboratoire de Recherche et Développement
## de l'Epita (LRDE).
## Copyright (C) 2003-2006 Laboratoire d'Informatique de Paris 6
## (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
@ -365,6 +365,7 @@ TESTS_python = \
python/accparse2.py \
python/alarm.py \
python/alternating.py \
python/bdddict.py \
python/bdditer.py \
python/bddnqueen.py \
python/bugdet.py \