apply3705 canvas.py: small efficiency changes py33
authorrobin
Wed, 31 Jul 2013 15:56:05 +0100
branchpy33
changeset 3757 d4f829a1a319
parent 3756 475d5ceb83b9
child 3758 2115c74b7806
apply3705 canvas.py: small efficiency changes
src/reportlab/pdfgen/canvas.py
--- a/src/reportlab/pdfgen/canvas.py	Wed Jul 31 15:31:33 2013 +0100
+++ b/src/reportlab/pdfgen/canvas.py	Wed Jul 31 15:56:05 2013 +0100
@@ -367,13 +367,10 @@
         self._extgstate = self._extgstate.pushCopy()
 
     def pop_state_stack(self):
-        state = self.state_stack[-1]
-        del self.state_stack[-1]
-        d = self.__dict__
-        d.update(state)
+        self.__dict__.update(self.state_stack.pop())
 
     STATE_ATTRIBUTES = """_x _y _fontname _fontsize _textMode _leading _currentMatrix _fillMode
-     _fillMode _charSpace _wordSpace _horizScale _textRenderMode _rise _textLineMatrix
+     _charSpace _wordSpace _horizScale _textRenderMode _rise _textLineMatrix
      _textMatrix _lineCap _lineJoin _lineDash _lineWidth _mitreLimit _fillColorObj
      _strokeColorObj _extgstate""".split()
     STATE_RANGE = list(range(len(STATE_ATTRIBUTES)))