[Python-Dev] PEP 303: Extend divmod() for Multiple Divisors
Paul Hughett
Paul Hughett <hughett@bbl.med.upenn.edu>
Thu, 2 Jan 2003 09:03:41 -0500
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