Ian Bicking wrote: > If you could somehow count how many times > the loop had run, that'd work great; but I don't see any way to do that > without new syntax.
line = None for line in some_lines: ... if line is None: # we didn't get any lines Speculating on a syntax to make this one line shorter: for line in some_lines else None: ... if line is None: # we didn't get any lines Or using a different keyword: for line in some_lines: ... except: # we didn't get any lines Greg _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com