After having read this, I thought about giving it a try:
>> python
Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import apt_pkg
>>> apt_pkg.UpstreamVersion('1.0-1')
zsh: segmentation fault python
Of course, it is perhaps not meant to be used that way, but the error handling isn't too impressive either.
~~DISCUSSION~~