[Python-ideas] Null coalescing operators
Sven R. Kunze
srkunze at mail.de
Mon Sep 21 07:11:05 CEST 2015
On 21.09.2015 06:57, Chris Angelico wrote:
> On Mon, Sep 21, 2015 at 2:52 PM, Sven R. Kunze <srkunze at mail.de> wrote:
>> I limit myself to materializing default arguments as in:
>>
>> def a(b=None):
>> b = b or {}
>> ...
> As long as you never need to pass in a specific empty dictionary,
> that's fine. That's the trouble with using 'or' - it's not checking
> for None, it's checking for falsiness.
True. Although I rarely pass a dynamic value to parameters with default
arguments. But you are right, so what does this mean for "??" ?
More information about the Python-ideas
mailing list