[Python-ideas] [Python-Dev] What's the status of PEP 505: None-aware operators?
storchaka at gmail.com
Wed Nov 29 06:53:42 EST 2017
29.11.17 11:45, Steven D'Aprano пише:
> On Wed, Nov 29, 2017 at 09:14:12AM +0200, Serhiy Storchaka wrote:
>> 29.11.17 08:08, Steven D'Aprano пише:
>>> Perl is hardly the only language with null-coalescing operators -- we
>>> might better describe ?? as being familiar to C#, PHP, Swift and Dart.
>>> That's two mature, well-known languages and two up-and-coming languages.
>> What is the syntax of the ternary operator in these languages?
> All four use:
> condition ? first : second
> for the ternary if operator.
If all four use ?, it is natural that in operators which are shortcuts
of the ternary operator they use ?. But in Python the bar of introducing
? is higher.
More information about the Python-ideas