[Python-ideas] Suggestion for standardized annotations
Yann Kaiser
kaiser.yann at gmail.com
Wed Mar 5 14:09:58 CET 2014
You could use a slight modification of sigtools.modifiers.annotate [1]
to create different objects with different function annotations. That
way programmers who only use one library have no change to do, and
those who use more only have to add a few lines devoid of the
verbosity of UUIDs.
[1] http://sigtools.readthedocs.org/en/latest/#sigtools.modifiers.annotate
On 5 March 2014 13:50, Paul Moore <p.f.moore at gmail.com> wrote:
> On 5 March 2014 11:53, Cem Karan <cfkaran2 at gmail.com> wrote:
>> Thoughts/suggestions?
>
> I think the core/stdlib position is that agreeing conventions would be
> better done once some real world experience of the practical issues
> and benefits of annotations has been established. So while a proposal
> like this is not without merit, it needs to be considered in the light
> of how projects actually use annotations. Personally, I'm not aware of
> any libraries that make significant use of annotations, so a good
> first step would be to survey existing use, and summarise it here.
> That would allow you to clarify your proposal in terms of exactly how
> existing projects would need to modify their current code.
>
> Of course, there's likely a chicken and egg problem here - projects
> may be holding off using annotations through fear of issues caused by
> clashes. But I'm not sure that a UUID-based proposal like the above
> (which as you admit is very verbose, and not particularly user
> friendly) would be more likely to encourage use.
>
> If I were developing a library that would benefit from annotations, at
> this point in time I'd probably just choose whatever conventions
> suited me and go with those - likely marking the feature as "subject
> to change" initially. Then, when people raised bug reports or feature
> requests that asked for better interoperability, I'd look at how to
> achieve that in conjunction with the other project(s) that clashed
> with me.
>
> Paul
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
More information about the Python-ideas
mailing list