I have a small script we\'re using to read in a CSV file containing employees, and perform some basic manipulations on that data.
We read in the data (import_gd_dump), a
you should close your files after reading them I suggest moving all compiled re's tot he top level (otherwise you compile them every call) if self.telephoneNumber is None or self.telephoneNumber == '': cen be easily rewrittent as if not self.telephoneNumber
Looks fine to me. Good job. How often are you going to run this script? Most of your questions are moot if this is a one-off thing.
Employees.cleen_all_phone_numbers()
delegates to Employee.clean_phone_number()
hrid
when you create them in O(n)
and then look them up in O(1)
.
lookup_*
you probably just want to index a dictionary.clean_phone_number()
should do that, Employees should be responsible for their own state.