import __past__ as a fade-out mechanism?
Huaiyu Zhu
huaiyu at gauss.almadan.ibm.com
Fri Feb 15 14:59:11 EST 2002
On Fri, 15 Feb 2002 15:05:00 +1300, Greg Ewing <greg at cosc.canterbury.ac.nz>
wrote:
>Huaiyu Zhu wrote:
>>
>> from __future__ import zerolead_octal so that 041 will mean 33.
>
>Shouldn't that be from __past__ import zerolead_octal? :-)
Yes, but the timbot had ruled out __past__ in many other threads. So I just
had to play with __future__. :-)
Thinking about this a bit more, I think __past__ can be a good mechanism for
fade-out transition just as __future__ is a good mechanism for fade-in
transition, as long as it is made clear that anything in the __past__ is
doomed to disappear sometime in the future.
Here's an example. Suppose a feature is being changed from A to B in
version 5. Early birds can import __future__ to use B in version 3, while
old holdouts can import __past__ to hold on to A until version 6:
version 1 2 3 4 5 6 7 8
__future__ . . B B B B B B
plain A A A (A) B B B B
__past__ A A A A A (A) (.) (.)
[Parenthesis denotes warning. Dot denotes unavailable.]
How about that?
Huaiyu
More information about the Python-list
mailing list