[Zope] Re: Preserving Context
Maciej Wisniowski
maciej.wisniowski at coig.katowice.pl
Wed Dec 13 06:29:56 EST 2006
> I'm confused. I had a programmer working for me that wrote the
> following code:
>
>
>
> return 0
>
> catalog = ''
>
> try:
>
> catalog = getattr(context, context.superValues('ZCatalog')[0].id)
>
> except AttributeError:
>
> pass
>
> if catalog:
>
> return 1
>
There is 'return 0' at the beginning, or it is a mistake?
If it is 'return 0' then the code below it is never executed...
--
Maciej Wisniowski
More information about the Zope
mailing list