Changeset 70:3b2f1b50b499 in livinglogic.python.tipimaid

Show
Ignore:
Timestamp:
01/05/09 18:37:58 (10 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Don't use default arguments.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • liaalh_mergelogs.py

    r69 r70  
    1414 
    1515 
    16 def reallines(iter, key=apachedate2utc): 
     16def reallines(iter, key): 
    1717    for item in iter: 
    1818        try: 
     
    2525 
    2626 
    27 def mergesort(list_of_lists, key=apachedate2utc): 
     27def mergesort(list_of_lists, key): 
    2828    heap = [] 
    2929    for i, itr in enumerate(iter(pl) for pl in list_of_lists): 
     
    4646 
    4747 
    48 openedfiles = [reallines(open(filename)) for filename in sys.argv[1:]] 
     48openedfiles = [reallines(open(filename), apachedate2utc) for filename in sys.argv[1:]] 
    4949 
    50 for line in mergesort(openedfiles, key=apachedate2utc): 
     50for line in mergesort(openedfiles, apachedate2utc): 
    5151    sys.stdout.write(line) 
    5252sys.stdout.flush()