Re: Workaround for a @staticmethod/@classmethod bug

"R. Tyler Ballance" <[email protected]>
Newsgroups gmane.comp.python.cheetah
Message-ID <[email protected]>
On Thu, May 21, 2009 at 02:26:23PM -0700, [email protected] wrote:
>    why do we need
>    #@staticmethod in cheetah templates?


The same reason you need @staticmethod in Python :)

>    On Thu, May 21, 2009 at 1:36 PM, R. Tyler Ballance <[email protected]>
>    wrote:
> 
>      We discovered thsi at Slide when we started using the #@staticmethod
>      decorator in some of our code, it looks like I made a minor oversight
>      when implementing and testing Cheetah's support for these decorators.
> 
>      The issue is that '_filter' is undefined inside these methods, the
>      workaround is to place the following line at the *top* of your
>      staticmethod function definition:
>             #set _filter = lambda x, **kwargs: unicode(x)
> 
>      Issue tracked here: http://bugs.communitycheetah.org/view.php?id=21
> 
>      Cheers
>      --
>      -R. Tyler Ballance
>      Slide, Inc.
>      ------------------------------------------------------------------------------
>      Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
>      is a gathering of tech-side developers & brand creativity professionals.
>      Meet
>      the minds behind Google Creative Lab, Visual Complexity, Processing, &
>      iPhoneDevCamp asthey present alongside digital heavyweights like
>      Barbarian
>      Group, R/GA, & Big Spaceship. http://www.creativitycat.com
>      _______________________________________________
>      Cheetahtemplate-discuss mailing list
>      [email protected]
>      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
> 
>    --
>    Bidegg worlds best auction site
>    http://bidegg.com

-- 
-R. Tyler Ballance
Slide, Inc.

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com

_______________________________________________
Cheetahtemplate-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkoVyDoACgkQFCbH3D9R4W8e6ACgoRaEHVykv5fkyldVio+vcKzC
bksAoLSg/eU+R9px2mPGAA+WskwWGhZz
=VOdX
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.