On 8/14/06, Jim Jewett <[EMAIL PROTECTED]> wrote: > On 8/14/06, Collin Winter <[EMAIL PROTECTED]> wrote: > > The problem with using lists is that its impossible for non-decorator > > annotation consumers to know which element "belongs" to them. > > The ones whose type they own -- which is why I see at least some > parallel to exceptions, and its inheritance based semantics. > > def f(a:[mytype("asdfljasdf"), > zope.mypackage.something(b,d,e), > "a string", > mytype([47]), > 15): > > Whoever defined mytype controls the meaning of the mytype annotations; > anyone not familiar with that package should ignore them (and hope > there were no side effects in the expressions that generated them). > > zope.mypackage controls that annotation; anyone not familiar with that > product should ignore it (and hope there were no side effects ...)
As hideous as I think this is from an aesthetics/visual noise standpoint, it's probably the only reliable way to let both decorator- and non-decorator-based consumers work. What would the rule be about top-level types? Would you have to use a list, or could a set or dict be used? Collin Winter _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com