Philippe Martin wrote: '' On the other hand, foo.__doc__ and foo.__name__ work fine. (I was going to quote your post but my reader interprets everything after the two dashes as your sig and ignores it. And I won't bother to fix it.)