help with print function in extension

Eric Hagemann ehagemann at
Wed Sep 25 03:47:05 CEST 2002

I'm handcrafting an extension in C

If have defined both a str() and a repr() function and when I execute either
repr(obj), or str(obj) I get what I expect

however if I execute 'print obj' I get the following error

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
SystemError: error return without exception set

although 'print str(obj)' works like I think it should

Am I mistaken in thinking that  'print str(obj)' should be the same as
'print obj'


More information about the Python-list mailing list