Christoph Zwerschke <[EMAIL PROTECTED]> wrote:

> That would be possible. But I still think it makes sense to separate 
> them, like so:
> 
> def foo(a: "a info", b: "b info") -> "ret info" raise "exc info":
>      return "hello world"
> 
> And then the annotation dictionary would contain another key "raise" 
> containing the exc info. This cannot conflict with the name of any other 
> parameter either.
> 

If you really want this then you can use a decorator to insert a 'raise' 
key into the annotations:

@raises("exc info")
def foo(a: "a info", b: "b info") -> "ret info":
        return "hello world"


> I don't know how determined the "->" syntax is already.

Consider the syntax set in concrete. The meaning of the annotations on the 
other hand is completely up for grabs.


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to