[Zope] <dtml-if> String question

Cornelis J. de Brabander brabander@fsw.LeidenUniv.nl
Tue, 16 May 2000 09:09:12 +0200


Hi Martijn,

> -----Original Message-----
> From: Martijn Pieters [mailto:mj@zopatista.com]On Behalf Of Martijn
> Pieters
> Sent: maandag 15 mei 2000 21:25
> To: Stuart Foster
> Cc: 'zope@zope.org'
> Subject: Re: [Zope] <dtml-if> String question
>
[snip]
> When you compare, for example 'id' with 'foo', where <dtml-var
> foo> renders
> 'foo', "id=='foo'" will still yield false. This is because 'id'
> is, on many
> objects, a method, while on others it is a property. In this
> example you'd be
> comparing the method object with a string, which always yields
> false, while
> the comparison "id()=='foo'" would yield true!
>

Up to now I have been using "id == 'foo'" without problems.
So what I would like to know now is in which case(s) id is a method and in
what case(s) id is a property. Enlighten me, please.

cb