[Zodb-checkins] [Checkins] SVN: ZODB/branches/3.8/src/persistent/wref.py Fix rest formatting (this was unreadable in the apidoc)

Christophe Combelles ccomb at free.fr
Sun Oct 12 06:11:52 EDT 2008


Wichert Akkerman a écrit :
> Previously Christophe Combelles wrote:
>> Log message for revision 92066:
>>   Fix rest formatting (this was unreadable in the apidoc)
>>   
>>
>> Changed:
>>   U   ZODB/branches/3.8/src/persistent/wref.py
>>
>> -=-
>> Modified: ZODB/branches/3.8/src/persistent/wref.py
>> ===================================================================
>> --- ZODB/branches/3.8/src/persistent/wref.py	2008-10-12 06:31:17 UTC (rev 92065)
>> +++ ZODB/branches/3.8/src/persistent/wref.py	2008-10-12 09:44:48 UTC (rev 92066)
>> @@ -28,74 +28,74 @@
>>      object to be called when the object is removed from the database.
>>  
>>      Here's an example. We'll start by creating a persistent object and
>> -    a refernce to it:
>> +    a reference to it::
>>  
>> -    >>> import persistent, ZODB.tests.MinPO
>> -    >>> import ZODB.tests.util
>> -    >>> ob = ZODB.tests.MinPO.MinPO()
>> -    >>> ref = WeakRef(ob)
>> -    >>> ref() is ob
>> -    True
>> +        >>> import persistent, ZODB.tests.MinPO
>> +        >>> import ZODB.tests.util
>> +        >>> ob = ZODB.tests.MinPO.MinPO()
>> +        >>> ref = WeakRef(ob)
>> +        >>> ref() is ob
>> +        True
> 
> This looks wrong: the >>>-prefixed lines are not preformatted text but
> sample code. There should be no need to treat them as preformatted text.

You're right, I think the right solution is to have a __docformat__ = 
"reStructuredText" instead, and removing the ::
It looks even better now :)

Christophe

> 
> Wichert.
> 



More information about the Zodb-checkins mailing list