[Checkins] SVN: zope.interface/trunk/src/zope/interface/README.
Fixed ReST markup
Dmitry Vasiliev
dima at hlabs.spb.ru
Sat Jun 23 06:47:34 EDT 2007
Log message for revision 76976:
Fixed ReST markup
Changed:
U zope.interface/trunk/src/zope/interface/README.ru.txt
U zope.interface/trunk/src/zope/interface/README.txt
-=-
Modified: zope.interface/trunk/src/zope/interface/README.ru.txt
===================================================================
--- zope.interface/trunk/src/zope/interface/README.ru.txt 2007-06-23 10:38:37 UTC (rev 76975)
+++ zope.interface/trunk/src/zope/interface/README.ru.txt 2007-06-23 10:47:34 UTC (rev 76976)
@@ -23,7 +23,7 @@
ÐпÑеделение инÑеÑÑейÑов
=======================
-ÐнÑеÑÑейÑÑ Ð¾Ð¿ÑеделÑÑÑÑÑ Ñ Ð¸ÑполÑзованием клÑÑевого Ñлова class:
+ÐнÑеÑÑейÑÑ Ð¾Ð¿ÑеделÑÑÑÑÑ Ñ Ð¸ÑполÑзованием клÑÑевого Ñлова class::
>>> import zope.interface
>>> class IFoo(zope.interface.Interface):
@@ -218,7 +218,7 @@
ÐÑ Ð¼Ð¾Ð¶ÐµÐ¼ обÑÑвиÑÑ Ð¸Ð½ÑеÑÑейÑÑ ÑеализÑемÑе дÑÑгими ÑабÑиками (кÑоме клаÑÑов).
ÐÑо можно ÑделаÑÑ Ð¸ÑполÑзÑÑ Ð´ÐµÐºÐ¾ÑаÑÐ¾Ñ `implementer` (в ÑÑиле Python 2.4).
-ÐÐ»Ñ Ð²ÐµÑÑий Python ниже 2.4 ÑÑо бÑÐ´ÐµÑ Ð²ÑглÑдеÑÑ ÑледÑÑÑим обÑазом:
+ÐÐ»Ñ Ð²ÐµÑÑий Python ниже 2.4 ÑÑо бÑÐ´ÐµÑ Ð²ÑглÑдеÑÑ ÑледÑÑÑим обÑазом::
>>> def yfoo(y):
... foo = Foo()
@@ -234,7 +234,7 @@
новÑй обÑекÑ.
Также надо оÑмеÑиÑÑ, ÑÑо как минимÑм ÑейÑÐ°Ñ implementer не Ð¼Ð¾Ð¶ÐµÑ Ð¸ÑполÑзоваÑÑÑÑ
-Ð´Ð»Ñ ÐºÐ»Ð°ÑÑов:
+Ð´Ð»Ñ ÐºÐ»Ð°ÑÑов::
>>> zope.interface.implementer(IFoo)(Foo)
... # doctest: +NORMALIZE_WHITESPACE
@@ -505,7 +505,7 @@
ÐнÑеÑÑÐµÐ¹Ñ Ð¼Ð¾Ð¶ÐµÑ Ð¿ÐµÑеопÑеделÑÑÑ Ð¾Ð¿ÑÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð°ÑÑибÑÑов из базовÑÑ
инÑеÑÑейÑов.
ÐÑли два базовÑÑ
инÑеÑÑейÑа опÑеделÑÑÑ Ð¾Ð´Ð¸Ð½ и ÑÐ¾Ñ Ð¶Ðµ аÑÑибÑÑ Ð°ÑÑибÑÑ
-наÑледÑеÑÑÑ Ð¾Ñ Ð±Ð¾Ð»ÐµÐµ ÑпеÑиÑиÑного инÑеÑÑейÑа. ÐÐ»Ñ Ð¿ÑимеÑа:
+наÑледÑеÑÑÑ Ð¾Ñ Ð±Ð¾Ð»ÐµÐµ ÑпеÑиÑиÑного инÑеÑÑейÑа. ÐÐ»Ñ Ð¿ÑимеÑа::
>>> class IBase(zope.interface.Interface):
...
@@ -524,7 +524,7 @@
... pass
ÐпÑеделение ISub Ð´Ð»Ñ foo бÑÐ´ÐµÑ Ð¸Ð· IBase2 Ñ.к. IBase2 более ÑпеÑиÑиÑен длÑ
-IBase:
+IBase::
>>> ISub['foo'].__doc__
'base2 foo doc'
@@ -532,7 +532,7 @@
ÐамеÑим, ÑÑо ÑÑо оÑлиÑаеÑÑÑ Ð¾Ñ Ð¿Ð¾Ð¸Ñка в глÑбинÑ.
Ðногда полезно ÑзнаÑÑ, ÑÑо инÑеÑÑÐµÐ¹Ñ Ð¾Ð¿ÑеделÑÐµÑ Ð°ÑÑибÑÑ Ð½Ð°Ð¿ÑÑмÑÑ. ÐÑ Ð¼Ð¾Ð¶ÐµÐ¼
-иÑполÑзоваÑÑ Ð¼ÐµÑод direct Ð´Ð»Ñ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ Ð½Ð°Ð¿ÑÑмÑÑ Ð¾Ð¿ÑеделеннÑÑ
аÑÑибÑÑов:
+иÑполÑзоваÑÑ Ð¼ÐµÑод direct Ð´Ð»Ñ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ Ð½Ð°Ð¿ÑÑмÑÑ Ð¾Ð¿ÑеделеннÑÑ
аÑÑибÑÑов::
>>> IBase.direct('foo').__doc__
'base foo doc'
@@ -545,7 +545,7 @@
ÐнÑеÑÑейÑÑ Ð¸ обÑÑÐ²Ð»ÐµÐ½Ð¸Ñ - ÑÑо ÑпеÑиалÑнÑе ÑлÑÑаи ÑпеÑиÑикаÑий. ÐпиÑание
вÑÑе Ð´Ð»Ñ Ð½Ð°ÑÐ»ÐµÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¸Ð½ÑеÑÑейÑов можно пÑимениÑÑ Ð¸ к обÑÑвлениÑм и
к ÑпеÑиÑикаÑиÑм. ÐбÑÑÐ²Ð»ÐµÐ½Ð¸Ñ ÑакÑиÑеÑки ÑаÑÑиÑÑÑÑ Ð¸Ð½ÑеÑÑейÑÑ ÐºÐ¾ÑоÑÑе они
-обÑÑвлÑÑÑ:
+обÑÑвлÑÑÑ::
>>> class Baz:
... zope.interface.implements(IBaz)
@@ -563,7 +563,7 @@
True
СпеÑиÑикаÑии (инÑеÑÑейÑÑ Ð¸ обÑÑвлениÑ) пÑедоÑÑавлÑÑÑ Ð°ÑÑибÑÑ `__sro__`
-коÑоÑÑй опиÑÑÐ²Ð°ÐµÑ ÑпеÑиÑикаÑÐ¸Ñ Ð¸ вÑеÑ
ее пÑедков:
+коÑоÑÑй опиÑÑÐ²Ð°ÐµÑ ÑпеÑиÑикаÑÐ¸Ñ Ð¸ вÑеÑ
ее пÑедков::
>>> baz_implements.__sro__
(<implementedBy __main__.Baz>,
Modified: zope.interface/trunk/src/zope/interface/README.txt
===================================================================
--- zope.interface/trunk/src/zope/interface/README.txt 2007-06-23 10:38:37 UTC (rev 76975)
+++ zope.interface/trunk/src/zope/interface/README.txt 2007-06-23 10:47:34 UTC (rev 76976)
@@ -21,7 +21,7 @@
Defining interfaces
===================
-Interfaces are defined using Python class statements:
+Interfaces are defined using Python class statements::
>>> import zope.interface
>>> class IFoo(zope.interface.Interface):
@@ -217,9 +217,8 @@
We can declare interfaces implemented by other factories (besides
classes). We do this using a Python-2.4-style decorator named
-`implementer`. In versions of Python before 2.4, this looks like:
+`implementer`. In versions of Python before 2.4, this looks like::
-
>>> def yfoo(y):
... foo = Foo()
... foo.y = y
@@ -233,7 +232,7 @@
should not assume that a new object is created.
Also note that, at least for now, implementer can't be used with
-classes:
+classes::
>>> zope.interface.implementer(IFoo)(Foo)
... # doctest: +NORMALIZE_WHITESPACE
@@ -505,7 +504,7 @@
An interface may override attribute definitions from base interfaces.
If two base interfaces define the same attribute, the attribute is
-inherited from the most specific interface. For example, with:
+inherited from the most specific interface. For example, with::
>>> class IBase(zope.interface.Interface):
...
@@ -524,7 +523,7 @@
... pass
ISub's definition of foo is the one from IBase2, since IBase2 is more
-specific that IBase:
+specific that IBase::
>>> ISub['foo'].__doc__
'base2 foo doc'
@@ -533,7 +532,7 @@
Sometimes, it's useful to ask whether an interface defines an
attribute directly. You can use the direct method to get a directly
-defined definitions:
+defined definitions::
>>> IBase.direct('foo').__doc__
'base foo doc'
@@ -546,7 +545,7 @@
Interfaces and declarations are both special cases of specifications.
What we described above for interface inheritance applies to both
declarations and specifications. Declarations actually extend the
-interfaces that they declare:
+interfaces that they declare::
>>> class Baz:
... zope.interface.implements(IBaz)
@@ -564,7 +563,7 @@
True
Specifications (interfaces and declarations) provide an `__sro__`
-that lists the specification and all of it's ancestors:
+that lists the specification and all of it's ancestors::
>>> baz_implements.__sro__
(<implementedBy __main__.Baz>,
@@ -604,7 +603,7 @@
>>> IBazFactory['__call__'].getTaggedValue('return_type')
<InterfaceClass __main__.IBaz>
-Tagged values can also be defined from within an interface definition:
+Tagged values can also be defined from within an interface definition::
>>> class IWithTaggedValues(zope.interface.Interface):
... zope.interface.taggedValue('squish', 'squash')
@@ -718,7 +717,7 @@
>>> I(C())
0
-Adapter hooks (see __adapt__) will also be used, if present:
+Adapter hooks (see __adapt__) will also be used, if present::
>>> from zope.interface.interface import adapter_hooks
>>> def adapt_0_to_42(iface, obj):
More information about the Checkins
mailing list