-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
In Python's type system Any is used to indicate that any type is accepted. We should add an explicit argument convertor for Any that recognizes it but doesn't do any conversion. Because we don't do any conversion for unrecognized types, and Any currently isn't recognized, this change wouldn't change much. It nevertheless has some benefits:
Anywill get its own type documentation pop-up in Libdoc HTML output explaining that all arguments are accepted without conversion.- It's becomes explicit that there's no conversion with
Any. - Behavior with
Anywon't change even if we later decide to handle unrecognized types differently than nowadays. See Support registering default argument converter #4628 for related discussion. - It would have avoided issues reported in Inconsistent argument conversion when using
Noneas default value with Python 3.11 and earlier #4626. Those issues are now fixed, but addingAnyconverter would help removing the somewhat annoying workaround code that was added.
Reactions are currently unavailable