<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"><span></span></div><div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8">When<div><br></div><div><p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Helvetica;"><span style="font-size: 12pt;">from __future__ import runtime_default_kwargs</span></p><p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Helvetica;"><span style="font-size: 12pt;"><br></span></p><p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Helvetica;"><br></p><div dir="ltr">Is run, </div><div dir="ltr"><br></div><div dir="ltr">def a(b=1, c=b+2, d=[]):</div><div dir="ltr">    pass</div><div dir="ltr"><br></div><div dir="ltr">behaves as (if the peephole optimizer didn’t exist)</div><div dir="ltr"><br></div><div dir="ltr">def a(b=None, c=None):</div><div dir="ltr">    if b is None:</div><div dir="ltr">        b = 1</div><div dir="ltr">    if c is None:</div><div dir="ltr">        c = b + 2</div><div dir="ltr">    if d is None:</div><div dir="ltr">        d = []</div><div dir="ltr"><br></div><div dir="ltr">i.e. the keyword expression is evaluated at runtime.</div></div><div dir="ltr"><br></div><div dir="ltr">Perhaps a restriction on “literals only” can be made so people don’t abuse this.</div></div></body></html>