Using instance as __doc__

Mel Wilson mwilson at
Thu Jun 5 19:00:23 CEST 2003

In article <5SKdnbYwob4BVkOjXTWcpw at>,
"Terry Reedy" <tjreedy at> wrote:
>"Seo Sanghyeon" <unendliche at> wrote in message
>news:45e6545c.0306041804.4ea5e07c at
>> So... Python throws out __doc__ if it is not a real string. Why not
>> something like "doc = str(doc)" instead? Yeah, quite useless,
>> I have no idea of possible use cases. But if there is some hidden
>> for not to use str() on instance __doc__, please enlighten me.
>Probably no one ever thought to do so.  And developers are reluctant
>to penalize 99.999% of uses for the .001% that might do something
>wierd like this

Looks like somebody's trying to internationalize doc strings.

        Regards.        Mel.

More information about the Python-list mailing list