[Python-ideas] "While" suggestion

Fred Drake fdrake at acm.org
Thu Jul 3 19:46:20 CEST 2008


On Jul 3, 2008, at 1:11 PM, Torsten Bronger wrote:
> Granted that "while True" is not eye-pleasant.  Maybe we could
> introduce the idion "while not break:".  ;-)


A little tongue-in-cheek, but works today:

# in some devious place:
import __builtin__
__builtin__.broken = False

# in application code:
while not broken:
     break_something()


   -Fred

-- 
Fred Drake   <fdrake at acm.org>







More information about the Python-ideas mailing list