From c298f5cedd36a647408e57086041a96f06a70231 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rg=20Lehmann?= Date: Sun, 25 Jan 2004 13:25:57 +0000 Subject: [PATCH] use inplace add method where possible git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@1308 069f4177-920e-0410-937b-c2a4a81bcd90 --- pyx/canvas.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyx/canvas.py b/pyx/canvas.py index 888e65fc..da9f77b7 100644 --- a/pyx/canvas.py +++ b/pyx/canvas.py @@ -151,10 +151,10 @@ class _canvas(base.PSCmd): def bbox(self): """returns bounding box of canvas""" - obbox = reduce(lambda x,y: - isinstance(y, base.PSCmd) and x+y.bbox() or x, - self.PSOps, - bbox._bbox()) + obbox = bbox.bbox() + for cmd in self.PSOps: + if isinstance(cmd, base.PSCmd): + obbox += cmd.bbox() # transform according to our global transformation and # intersect with clipping bounding box (which have already been -- 2.11.4.GIT