JoelMon / pyTalkManager

Software to aid public talk coordinators in the congregations of Jehovah's Witnesses.
http://theodevelopers.github.io/pyTalkManager
6 stars 1 forks source link

Improve the add_item method #36

Closed JoelMon closed 10 years ago

JoelMon commented 10 years ago

In the add_item method there's these [two for loops]:(https://github.com/TheoDevelopers/pyTalkManager/blob/setup-brotherDB-read-write/db.py#L98):

for each_column in column:
    list_column = list_column + each_column + ', '

for each_value in value:
    list_value = list_value + each_value + ', '

Those two for loops can be boiled down into one method inside of add_items that accepts data in a list and returns a properly formatted string ready to be used.