Thanks!
> On 08/21/2012 12:44 PM, Miki Tebeka wrote:
>
> >
>
> >>> class B:
>
> > ... '''a {} string'''.format('doc')
>
> > ...
>
> B.__doc__
>
>
>
> > I wonder why the first B docstring is empty. Thanks, -- Miki
>
>
>
> According to some early documentation:
>
>
On 08/21/2012 12:44 PM, Miki Tebeka wrote:
>
>>> class B:
> ... '''a {} string'''.format('doc')
> ...
B.__doc__
> I wonder why the first B docstring is empty. Thanks, -- Miki
According to some early documentation:
"convenient initialization of the |__doc__| attribute of modu
On Tue, 21 Aug 2012 09:44:10 -0700, Miki Tebeka wrote:
> Greetings,
>
class A:
> ... '''a doc string'''
> ...
A.__doc__
> 'a doc string'
class B:
> ... '''a {} string'''.format('doc') ...
B.__doc__
> Is there's a reason for this?
Yes. Python only generates
On Tue, Aug 21, 2012 at 11:09 AM, Ian Kelly wrote:
> On Tue, Aug 21, 2012 at 10:44 AM, Miki Tebeka wrote:
>> Greetings,
>>
> class A:
>> ... '''a doc string'''
>> ...
> A.__doc__
>> 'a doc string'
> class B:
>> ... '''a {} string'''.format('doc')
>> ...
> B.__doc__
>
>
On 21/08/2012 17:44, Miki Tebeka wrote:
Greetings,
class A:
... '''a doc string'''
...
A.__doc__
'a doc string'
class B:
... '''a {} string'''.format('doc')
...
B.__doc__
Is there's a reason for this?
I know I can do:
class B:
...__doc__ = '''a {} string'''.format('doc')
On Tue, Aug 21, 2012 at 10:44 AM, Miki Tebeka wrote:
> Greetings,
>
class A:
> ... '''a doc string'''
> ...
A.__doc__
> 'a doc string'
class B:
> ... '''a {} string'''.format('doc')
> ...
B.__doc__
>
> Is there's a reason for this?
>
> I know I can do:
class B
Greetings,
>>> class A:
... '''a doc string'''
...
>>> A.__doc__
'a doc string'
>>> class B:
... '''a {} string'''.format('doc')
...
>>> B.__doc__
>>>
Is there's a reason for this?
I know I can do:
>>> class B:
...__doc__ = '''a {} string'''.format('doc')
And it'll work, but I wo