help with print function in extension

Eric Hagemann ehagemann at comcast.net
Tue Sep 24 21:47:05 EDT 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'

Cheers






More information about the Python-list mailing list