Issue 1719222: new functool: "defaults" decorator (original) (raw)

Created on 2007-05-15 11:42 by ascription, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
defaults.txt ascription,2007-05-15 11:42 Rationale, approximation, testcase
Messages (4)
msg55108 - (view) Author: Aaron Brady (ascription) Date: 2007-05-15 11:42
Python feature Functools gains a new decorator. `Defaults' allows its caller to placehold non-None defaults; it becomes unnecessary to know the value a place defaults to. It might be useful in cases where you want the calling signature to look alike for a group of dispatched functions and the added overhead the decorator adds isn't a problem. But you probably wouldn't want that overhead all the time, so having it as an optional decorator would be good. -Ron Adam
msg55109 - (view) Author: Josiah Carlson (josiahcarlson) * (Python triager) Date: 2007-05-15 14:25
This is not a bug. Should move to Feature Requests at minimum, patches if the text file is an actual patch. Generally the poster desires that a catch-all default argument be allowed to be passed to any function with default arguments to signal that the original defaults should be used; like foo(123, default, 456) rather than foo(123, arg3=456). This proposal received no support in python-ideas.
msg55110 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-05-15 14:47
Moving to Feature Requests, adapting summary.
msg55111 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2007-05-28 04:51
Rejecting due to lack of support.
History
Date User Action Args
2022-04-11 14:56:24 admin set github: 44954
2007-05-15 11:42:20 ascription create