Guido van Rossum wrote: ...
mm = ss//60; ss %= 60
is very readable to me, very efficient, and doesn't use extra tuples.
A good optimizing compiler could also get rid of extra tuples.
Yes. It could also figure out how to save one division if it sees the above line instead of divmod. But do you have it?
On dropping features, I came to this in the morning:
You said you might optimize certain builtins by the compiler, instead of removing divmod.
[proposal to replace divmod by Python code]
But what about long division, where divmod can (in extreme cases) really save time by doing the division only once?
Would this case be special-cased in the interpreter code? If not, the long divmod version would probably not be replaced.
Let's first make some steps towards the better compiler I alluded to. Then we can start cutting.
If this is a promise, I'm happy. Enhancing the compiler *and* cutting code really improves the ovrall quality.
This is a real wish and *no* Silvester joke :-)
If only I knew what Silvester was. Is it a German holiday celebrating the invention of root beer? :-)
Silvester is New Year's Eve; Hogmanay in Scotland. We have lots of celebration, drinks, and many fire works at midnight, to bomb the bad ghosts away for the new year. We also define new goals, things to do better.
One of my goals is to enhance Python while reducing its C code base. Another one is to get the portable part of Stackless 3.0 into the Python core.
cheers - chris