[Zope] string formatting

Andreas Jung lists at zopyx.com
Sun Aug 15 01:45:53 EDT 2010


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

Jaroslav Lukesh wrote:
> 
> ----- Puvodní zpráva ----- Od: "Andreas Jung" <lists at zopyx.com>
>>
>> Jaroslav Lukesh wrote:
>>> It is easy:
>>>
>>> <dtml-call "REQUEST.set('signumfix2',signum2[1:4])">
>>> <dtml-call "REQUEST.set('signumfix2', _.int(signumfix2)+1)">
>>> <dtml-call "REQUEST.set('signumFinal', 'B' + _.str(1000 +
>>> signumfix2)[1:] )">
>>>
>>>
>>
>> Hopefully such code won't be released :-)
> 
> It was for illustration only, here is the better one:
> 
> <dtml-call "REQUEST.set('signumFinal', 'B' + _.str(1001 +
> _.int(signum2[1:]))[1:])">

Ugliness is in the eye of the beholder.

*shrug* :-)
- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxnfxEACgkQCJIWIbr9KYwQlACfX/BPuBMzMk+HfdfG1zrDl1D5
ALcAoIdzCYk8X+NsqGIm2p/2jK+Up8vW
=8jNW
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lists.vcf
Type: text/x-vcard
Size: 316 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20100815/a76b1f59/attachment.vcf 


More information about the Zope mailing list