In <[EMAIL PROTECTED]>, Merrigan wrote:

> The Script it available at this url : 
> http://www.lewendewoord.co.za/theScript.py
> 
> P.S. I know it looks like crap, but I'm a n00b, and not yet through
> the OOP part of the tutorial.

One spot of really horrible runtime is the `comp_are()` function, it has
quadratic runtime. Why the funny spelling BTW?

Why are you binding the objects to new names all the time and calling
`str()` repeatedly on string objects?  The names `a`, `b` and `fn2up` are
unnecessary, you can use `file1`, `file2` and `filename` instead.  And
``str(str(b))`` on a string object is a no-operation.  It's the same as
simply writing ``b``.

Those two nested ``for``-loops can be replaced by converting both lists
into `set()` objects, calculating the difference and convert back to a
sorted list:

def compare(remote, local):
    return sorted(set(local) - set(remote))

Ciao,
        Marc 'BlackJack' Rintsch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to