
Jan. 2, 2003
2:03 p.m.
Guido wrote:
Hey, if we'll killing off builtins, I vote for apply().
Agreed, it's redundant. You can help by checking in documentation that marks it as deprecated and code that adds a PendingDeprecationWarning to it (unfortunately it's so common that I wouldn't want to risk a plain DeprecationWarning).
You've lost me here. I've recently written a piece of code that uses a lookup table on the name of a file to find the right function to apply to it; if I don't use apply for this, what should I use? An explicit case statement cannot be dynamically modified; using eval() requires a conversion to string (and is arguably even uglier than apply). Paul Hughett