[Python-ideas] PEP 505: None-aware operators
Grégory Lielens
gregory.lielens at gmail.com
Mon Jul 23 07:39:09 EDT 2018
Maybe it would help if you mention in which context you will benefit the
most? If the python sub-community related to this context agree "?? and
friends" is a good idea, then it will add weight to the proposal. Else,
probably better to forget it.
It seems related to JSON, but as I have never used it, it's a wild guess.
Anyway, it's a special pattern with deep attribute hierarchies, whose
traversal is shortcutted when one attribute happen to be None.
This is common, with 2 exception:
-it's rare it's really deep, or then it is arbitrarily deep and you need a
procedural descent, not a fixed expression.
-None break the descend, but then so does missing attributes.
You address the first with special syntax. not the second, so I suspect in
your case the second does not happen. Or rarely happen.
Hope this will help finding why some finds the ? operators add little,
while some others think they add enough to overcome python traditional
operator-averse nature.
On Monday, July 23, 2018 at 1:10:03 PM UTC+2, Steve Dower wrote:
>
> On 23Jul2018 1145, Antoine Pitrou wrote:
> >
> > Le 23/07/2018 à 12:38, Steve Dower a écrit :
> >>
> >> General comment to everyone (not just Antoine): these arguments have
> >> zero value to me. Feel free to keep making them, but I am uninterested.
> >
> > So you're uninterested in learning from past mistakes?
> >
> > You sound like a child who thinks their demands should be satisfied
> > because they are the center of the world.
>
> Sorry if it came across like that, it wasn't the intention. A bit of
> context on why you think it's a mistake would have helped, but if it's a
> purely subjective "I don't like the look of it" (as most similar
> arguments have turned out) then it doesn't add anything to enhancing the
> PEP. As a result, I do not see any reason to engage with this class of
> argument.
>
> I hope you'll also notice that I've been making very few demands in this
> thread, and have indicated a number of times that I'm very open to
> adjusting the proposal in the face of honest and useful feedback.
>
> Cheers,
> Steve
> _______________________________________________
> Python-ideas mailing list
> Python... at python.org <javascript:>
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180723/b6f1f907/attachment.html>
More information about the Python-ideas
mailing list