[Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

Yury Selivanov yselivanov.ml at gmail.com
Fri Jun 22 23:04:03 CEST 2012


On 2012-06-22, at 4:58 PM, Ethan Furman wrote:
> That looks strange to me -- I suggest putting brackets around each one, like:
> 
>   replace(*, [name=<optional>,] [kind=<optional>,] [default=<optional>,] [annotation=<optional>]) -> Parameter

Isn't it too much?  The PEP clearly indicates '=<optional>' is just
a notation for an optional parameter.

If it's that much of an issue - We can use '=_void' instead, as it is 
in the implementation, and describe how it works.  But that's just noise,
that will distract the reader from the PEP.

> which is still a bit noisy.  At the risk of raising the ire of those who don't condone the use of '...' :)  how about:
> 
>   replace(*, [name=...,] [kind=...,] [default=...,] [annotation=...]
>            ) -> Parameter

That may confuse someone, as ... - Ellipsis is a legitimate object
to be used as a default value or annotation:

     def foo(bar:...=...)->...:
         pass

I'd keep it simple ;)

-
Yury


More information about the Python-Dev mailing list