Zope/DTML Infuriating...

Marco Mariani marco at sferacarta.com
Tue Apr 29 14:45:30 CEST 2008

Jens wrote:

>> You might have wrong assumptions from previous PHP experiences.
>>  >>> 'x'+4
>> Traceback (most recent call last):
>>    File "<stdin>", line 1, in <module>
>> TypeError: cannot concatenate 'str' and 'int' objects
>>  >
> ... and the non snobby answer would have been:
> ...  <dtml-var expr="_['prefix'] + str(_['sequence-item'])">

Sorry. Not trying to be snobbish, only in a hurry.

That answer would have been less useful, because there are TONS of 
details in the python tutorial, that set the language apart from its 
"scripting cousins".
Reading the syntax and thinking "yeah, got it, boring, next chapter" is 
a common mistake I've also made sometime, especially with python when 
I've been deceived by its apparent simplicity.
Then, later, the same happened with Javascript, of course.
And it's bound to happen again, as much as I'll try to be careful :-(

More information about the Python-list mailing list