<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On May 31, 2007, at 6:15 AM, Ali Sabil wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Hello all,<BR><BR>I was looking into function annotations, that are to be introduced in Python3k, and I found this old message sent to this mailing list : <A href="http://mail.python.org/pipermail/python-ideas/2007-January/000037.html"> http://mail.python.org/pipermail/python-ideas/2007-January/000037.html</A><BR><BR>I would like to restart the discussion of attribute annotation, because in my opinion it can be a very powerful feature. I personally think about using it for SOAP message serialization, or any kind of XML serialization, the Idea would be to annotate various object attribues to be either marshaled as XML Elements or XML Attributes of the current Node that reflects the Object. <BR><BR></BLOCKQUOTE><BR></DIV><DIV>Hi Ali,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'm afraid the PEP deadline has passed, restarting the discussion would</DIV><DIV>not change that.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Your use case sounds interesting. I know there are a lot of other use cases for </DIV><DIV>attribute meta-data. However there are lots of ways to achieve attribute meta data </DIV><DIV>storage.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV># Via naming convention</DIV><DIV>class A:</DIV><DIV>  attr = 1</DIV><DIV>  f_attr = int</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV># Via decorators</DIV><DIV>class A:</DIV><DIV>  attr = annotated_value(1, int)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV># Via a separate class</DIV><DIV>class A:</DIV><DIV>  class meta:</DIV><DIV>    attr = int</DIV><DIV>  attr = 1</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV># Compare to attribute annotation syntax</DIV><DIV>class A:</DIV><DIV>  attr: int = 1</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Each of the existing idioms I have seen or used has issues, mostly minor. I suspect that because </DIV><DIV>the existing ways don't have glaring deficiencies, even if it were before the PEP deadline, a renewed</DIV><DIV>push on the proposal would have encountered a lot more resistance.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I still think the syntax is elegant in symmetry and provides a unified and improved idiom for </DIV><DIV>a common use case.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><DIV>-Tony</DIV><DIV><BR class="khtml-block-placeholder"></DIV></DIV></BODY></HTML>