I'm currently confused on this one. limit by default is none, but if i were to test this in unitest and ask a specific number of comments it would say type mismatch. I know that "int" is not the correct term. I'm only saying that the limit should be an integer. What would be the proper way of addressing the input depending on what the limit is in the unitest.
def list_comments(db, limit=None): limit = "int"
limit = "int"
cur = db.cursor()
cur.execute("SELECT id, comment FROM comments ORDER BY id DESC LIMIT ?", (limit,))
results = cur.fetchall()
print results
return results