kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #08771
Re: Python binding of enums
On 08/09/2012 10:52 AM, Miguel Angel Ajo Pelayo wrote:
> You have defined the options we have perfectly clear, now we're at "1",
> for most cases shouldn't be a problem. But for some it might be.
>
> Only one point, if you pass a string where an int should be, SWIG will launch
> an exception back to python, and python will tell the user. The only
> (known) case is int == enum.
>
> Greetings! :)
Actually you have been exceptionally clear and easy to work with.
I just want Jean-Pierre and Wayne to step in and comment on the
notion of using a "bad argument exception" before it becomes propagated widely.
Some costs are obviously worth the benefit. That decision however, needs to be made
consciously and with all the data and alternatives in hand.
I will now rest my case, the yellow light has flashed.
Thanks,
Dick
Follow ups
References