> No, it is not about template-related error messages :-)... > > I am wrapping a class: > Obviously, the error is that I forgot '()' in the second get(). I > am > getting this error message: > > 0 > <bound method X.get of <Test.X object at 0x2b0db13d4cb0>> > > Is there a way to give user a more friendly error message in such > case, > with at least a line number where it happened?
This has nothing to do with boost.python. It's how python works. For example: >>> class X(object): def __init__(self): self._x = 0 def get(self): return self._x >>> x = X() >>> print x.get() 0 >>> print x.get <bound method X.get of <__main__.X object at 0x02084FB0>> And accessing 'x.get' is not in itself an error. You may want to pass that bound method to a function expecting a callable, for instance. Alex _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig