Hi,
Collin Winter wrote:
> def compile(source: "something compilable",
> filename: "where the compilable thing comes from",
> mode: "is this a single statement or a suite?"):
> ...
>
> def sum(*vargs: Number) -> Number:
> ...
Admittedly, I'm not so much in the "Spring stew" discussion, but I'm not a big
fan of cluttering up my function signature with "make them short to make them
fit" comments.
What would be wrong in adding a standard decorator for this purpose? Something
like:
@type_annotate("This is a filename passed as string", filename = str)
@type_annotate(source = str)
def compile(source, filename, mode):
...
or, more explicitly:
@arg_docstring(filename = "This is a filename passed as string")
@arg_type(filename = str)
@arg_type(source = str)
def compile(source, filename, mode):
...
Stefan
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com