Commits

Bob Ippolito committed d706726

Update NEWS/TODO w.r.t. Protocol support

Comments (0)

Files changed (4)

 also <cite>Performance tuning/testing</cite>.</p>
 <h3><a href="#id19" name="formal-protocols-distributed-objects">Formal Protocols, Distributed Objects</a></h3>
 <p><code><span>DO</span></code> seems to use formal protocols, we don't fully support those. There is 
-an equivalent to <code><span>@protocol(Foo)</span></code>, but it is not yet possible to define
-new protocols in Python.</p>
+an equivalent to <code><span>@protocol(Foo)</span></code>, and classes can declare that they
+implement formal protocols, but it is not yet possible to define
+a new formal protocol in Python.</p>
 <h3><a href="#id20" name="links-to-apple-documentation">Links to Apple documentation</a></h3>
 <p>Links to Apple documentation are not stable, can we add a layer of indirection
 here, e.g. link to the PyObjC website that will redirect to the right
 .....................................
 
 ``DO`` seems to use formal protocols, we don't fully support those. There is 
-an equivalent to ``@protocol(Foo)``, but it is not yet possible to define
-new protocols in Python.
+an equivalent to ``@protocol(Foo)``, and classes can declare that they
+implement formal protocols, but it is not yet possible to define
+a new formal protocol in Python.
 
 Links to Apple documentation
 ............................
 <ul>
 <li>(UNFINISHED) New RemotePyInterpreter example that demonstrates an
 out-of-process Python interpreter (primarily for IDE uses).</li>
+<li>PyObjC classes can now declare that they implement formal protocols,
+for example:<pre>
+class MyLockingClass(NSObject, objc.protocolNamed('NSLocking')):
+    # implementation
+    pass
+</pre>
+</li>
 <li>PyObjCTools.KeyValueCoding has a new <code><span>kvc</span></code> class that allows
 Pythonic Key-Value Coding.<ul>
 <li><code><span>__getitem__</span></code> is mapped to <code><span>valueForKeyPath:</span></code></li>
 - (UNFINISHED) New RemotePyInterpreter example that demonstrates an
   out-of-process Python interpreter (primarily for IDE uses).
 
+- PyObjC classes can now declare that they implement formal protocols,
+  for example::
+
+    class MyLockingClass(NSObject, objc.protocolNamed('NSLocking')):
+        # implementation
+        pass
+        
 - PyObjCTools.KeyValueCoding has a new ``kvc`` class that allows
   Pythonic Key-Value Coding.