On Thu, Nov 4, 2021 at 4:38 AM Steven D'Aprano <[email protected]> wrote:
>
> On Wed, Nov 03, 2021 at 10:25:02AM -0700, Ethan Furman wrote:
>
> > Which is horrible.  Put the @ at the front:
> >
> > - its relation to decorators, and delayed evaluation, is much more clear
> > - it stands out better to the reader
>
> I agree. (Well, I would, wouldn't I? :-)
>
> But if people really, really hate the idea of the @ symbol as a prefix
> modifier/sigil, I think that there are some alternatives which also look
> good. (See my previous post.)
>
>     !parameter=expression  # bang parameter
>     >parameter=expression
>     ^parameter=expression
>     ~parameter=expression
>
> (but not $parameter, thank you).
>
> I suppose that we could even add yet another overloaded meaning on the
> asterix:
>
>     # with no default, * keeps the old meaning of collecting
>     # extra positional values
>
>     *parameter
>
>     # with a default, * triggers late-binding
>
>     *parameter=expression
>
> I should hate that, I know I should... but I kinda don't.
>

I'll save you the trouble: I hate that :)

As I said in the other post, *param changes the meaning of param
itself. If there's any meaning to *param=expr, it should be something
like "provide one or more args, but if you provide zero, use this
instead". Which seems pretty weird.

ChrisA
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/NT5UCVQAFWJXGRHPZXHHCPSIRCCR7RBX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to