diff --git a/pymysql/cursors.py b/pymysql/cursors.py index 18b6a25..41b3858 100644 --- a/pymysql/cursors.py +++ b/pymysql/cursors.py @@ -137,7 +137,26 @@ class Cursor(object): return query def execute(self, query, args=None): - '''Execute a query''' + """ + Execute a query + + Parameters + ---------- + query : str + Query to execute on the server. + args : tuple, list or dict, optional + Will be used with query + + Returns + ------- + int + Number of affected rows + + Notes + ----- + If args is a sequence, %s can be used as a placeholder in the query. + If args is a dict, %(name)s can be used as a placeholder in the query. + """ while self.nextset(): pass