Article 5RRDQ [$] Late-bound argument defaults for Python

[$] Late-bound argument defaults for Python

by
jake
from LWN.net on (#5RRDQ)
Python supports default values for arguments to functions, but thosedefaults are evaluated at function-definition time. A proposal to adddefaults that are evaluated when the function is called has been discussedat some length on the python-ideas mailing list. The idea came about, in part,due to yet another resurrection of the proposalfor None-aware operators in Python. Late-bound defaults would helpwith one use case for those operators, but there are other, strongerreasons to consider their addition to the language.
External Content
Source RSS or Atom Feed
Feed Location http://lwn.net/headlines/rss
Feed Title LWN.net
Feed Link https://lwn.net/
Reply 0 comments