~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Aaron Bentley
  • Date: 2006-04-19 02:50:56 UTC
  • mto: This revision was merged to the branch mainline in revision 1672.
  • Revision ID: aaron.bentley@utoronto.ca-20060419025056-3847eb042f075760
Knit plan_merge uses slices instead of xenumerate

Show diffs side-by-side

added added

removed removed

Lines of Context:
653
653
 
654
654
def supports_executable():
655
655
    return sys.platform != "win32"
656
 
 
657
 
 
658
 
def xenumerate(iter, stop=None, start=0, step=1):
659
 
    count = start
660
 
    if start == stop:
661
 
        return
662
 
    for result in iter:
663
 
        yield count, result
664
 
        count += step
665
 
        if count == stop:
666
 
            return