@@ -185,7 +185,7 @@ def _parse_map(self, cc):
185185 rv = {}
186186 key = b''
187187 found_key = False
188- self ._depth = self . _depth + 1
188+ self ._depth += 1
189189 # skip the beginning '{'
190190 cc = self ._getc ()
191191 while (cc != b'}' ):
@@ -211,7 +211,7 @@ def _parse_map(self, cc):
211211 else :
212212 self ._error ("missing separator" )
213213 cc = self ._getc ()
214- self ._depth = self . _depth - 1
214+ self ._depth -= 1
215215
216216 return rv
217217
@@ -222,7 +222,7 @@ def _parse_array(self, cc):
222222 array: [ object, object, object ]
223223 """
224224 rv = []
225- self ._depth = self . _depth + 1
225+ self ._depth += 1
226226 # skip the beginning '['
227227 cc = self ._getc ()
228228 while (cc != b']' ):
@@ -233,7 +233,7 @@ def _parse_array(self, cc):
233233 continue
234234 rv .append (self ._parse (cc ))
235235 cc = self ._getc ()
236- self ._depth = self . _depth - 1
236+ self ._depth -= 1
237237 return rv
238238
239239 def _parse_uuid (self , cc ):
@@ -454,22 +454,22 @@ def _DATE(self, v):
454454 def _ARRAY (self , v ):
455455 self .stream .write (b'[' )
456456 delim = b''
457- self ._depth = self . _depth + 1
457+ self ._depth += 1
458458 for item in v :
459459 self .stream .write (delim )
460460 self ._generate (item )
461461 delim = b','
462- self ._depth = self . _depth - 1
462+ self ._depth -= 1
463463 self .stream .write (b']' )
464464 def _MAP (self , v ):
465465 self .stream .write (b'{' )
466466 delim = b''
467- self ._depth = self . _depth + 1
467+ self ._depth += 1
468468 for key , value in v .items ():
469469 self .stream .writelines ([delim , b"'" , self ._esc (UnicodeType (key )), b"':" ])
470470 self ._generate (value )
471471 delim = b','
472- self ._depth = self . _depth - 1
472+ self ._depth -= 1
473473 self .stream .write (b'}' )
474474
475475 def _esc (self , data , quote = b"'" ):
0 commit comments