[Tutor] repr()

Bernard Lebel 3dbernard at gmail.com
Tue Jun 7 21:42:39 CEST 2005


Hello,

Possibly I am missing something, but how do you use the repr() function?

I type this ultra-simple function:

def myFunc(): print 'hello'

Then run

repr( myFunc )

Wich returns

'<function myFunc at 0x009C6630>'


Okay then I run

s = repr( myFunc() )
print s

Wich returns

'None'


Thanks
Bernard


More information about the Tutor mailing list