[Python-3000] Draft pre-PEP: function annotations

Calvin Spealman ironfroggy at gmail.com
Sun Aug 13 08:07:19 CEST 2006

On 8/13/06, Paul Prescod <paul at prescod.net> wrote:
> I made a proposal that Phillip was mostly okay with. What do other
> participants in the thread think? Would it move towards resolving this
> thread?
> "In order for processors of function annotations to work interoperably, they
> must use a common interpretation of objects used as annotations on a
> particular function. For example, one might interpret string annotations as
> docstrings. Another might interpet them as path segments for a web
> framework. For this reason, function annotation processors SHOULD avoid
> assigning processor-specific meanings to types defined outside of the
> processor's framework. For example, a Django processor could process
> annotations of a type defined in a Zope package, but Zope's creators should
> be considered the authorities on the type's meaning for the same reasons
> that they would be considered authorities on the semantics of classes or
> methods in their packages. This implies that the interpretation of built-in
> types would be controlled by Python's developers and documented in Python's
> documentation. This is just a best practice. Nothing in the language can or
> should enforce this practice and there may be a few domains where there is a
> strong argument for violating it ( e.g. an education environment where
> saving keystrokes may be more important than easing interopability)."
> "In Python 3000, semantics will be attached to the following types:
> basestring and its subtypes are to be used for documentation (though they
> are not necessarily the exclusive source of documentation about the type).
> List and its subtypes are to be used for attaching multiple independent
> annotations."
>  Paul Prescod


This needs resolved, and willy-nilly use of built-in types or someone
else's types.. doesn't seem like anyone could be supportive of that.

More information about the Python-3000 mailing list