@@ -1152,17 +1152,16 @@ def decr(self, name, amount=1):
1152
1152
Decrements the value of ``key`` by ``amount``. If no key exists,
1153
1153
the value will be initialized as 0 - ``amount``
1154
1154
"""
1155
- return self .execute_command ('DECRBY' , name , amount )
1155
+ # An alias for ``decr()``, because it is already implemented
1156
+ # as DECRBY redis command.
1157
+ return self .decrby (name , amount )
1156
1158
1157
1159
def decrby (self , name , amount = 1 ):
1158
1160
"""
1159
1161
Decrements the value of ``key`` by ``amount``. If no key exists,
1160
1162
the value will be initialized as 0 - ``amount``
1161
1163
"""
1162
-
1163
- # An alias for ``decr()``, because it is already implemented
1164
- # as DECRBY redis command.
1165
- return self .decr (name , amount )
1164
+ return self .execute_command ('DECRBY' , name , amount )
1166
1165
1167
1166
def delete (self , * names ):
1168
1167
"Delete one or more keys specified by ``names``"
@@ -1240,17 +1239,16 @@ def incr(self, name, amount=1):
1240
1239
Increments the value of ``key`` by ``amount``. If no key exists,
1241
1240
the value will be initialized as ``amount``
1242
1241
"""
1243
- return self .execute_command ( 'INCRBY' , name , amount )
1242
+ return self .incrby ( name , amount )
1244
1243
1245
1244
def incrby (self , name , amount = 1 ):
1246
1245
"""
1247
1246
Increments the value of ``key`` by ``amount``. If no key exists,
1248
1247
the value will be initialized as ``amount``
1249
1248
"""
1250
-
1251
1249
# An alias for ``incr()``, because it is already implemented
1252
1250
# as INCRBY redis command.
1253
- return self .incr ( name , amount )
1251
+ return self .execute_command ( 'INCRBY' , name , amount )
1254
1252
1255
1253
def incrbyfloat (self , name , amount = 1.0 ):
1256
1254
"""
0 commit comments