[Zope-dev] SVN: five.pt/trunk/ Fixed a calling convention oddity.

Tres Seaver tseaver at palladion.com
Tue Jan 5 19:50:31 EST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Malthe Borch wrote:
> Log message for revision 107710:
>   Fixed a calling convention oddity.
> 
> Changed:
>   U   five.pt/trunk/CHANGES.txt
>   U   five.pt/trunk/src/five/pt/patches.py
> 
> -=-
<snip>
> Modified: five.pt/trunk/src/five/pt/patches.py
> ===================================================================
> --- five.pt/trunk/src/five/pt/patches.py	2010-01-05 15:50:46 UTC (rev 107709)
> +++ five.pt/trunk/src/five/pt/patches.py	2010-01-05 16:32:23 UTC (rev 107710)
> @@ -26,7 +26,7 @@
>  except ImportError:
>      from zope.app.pagetemplate.viewpagetemplatefile import BoundPageTemplate
>      import Acquisition
> -    
> +
>      class BoundPageTemplate(BoundPageTemplate, Acquisition.Implicit):
>          """Implementing Acquisition.interfaces.IAcquirer and
>          IAcquisitionWrapper.
> @@ -34,9 +34,9 @@
>  
>          __parent__ = property(lambda self: self.im_self)
>  
> -        def __call__(self, *args, **kw):
> +        def __call__(self, im_self=None, *args, **kw):
>              if self.im_self is None:
> -                im_self, args = args[0], args[1:]
> +                im_self = im_self
>              else:
>                  im_self = aq_base(self.im_self)
>                  if IAcquirer.providedBy(im_self):

<snip>

That can't be right:  the if clause is a no-op.  And no test for the
case which was broken?



Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAktD3igACgkQ+gerLs4ltQ7TZACeMO8fPNvRL10ySynw2ALSP9KF
dpkAni7rXfeg6Xg+FzK1c+kPNpj1RkGN
=n5Zm
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list