[ZPT] 1.3.0 issues with trailing '/'

Steve Spicklemire steve@spvi.com
Wed, 23 May 2001 08:51:49 -0500


OK.. this works now:

<span tal:define="	global Batch python:modules['ZTUtils'].Batch;
				  	global theCatalog  python:here.Catalog;
				  	global artists python:here.Artists;
				  	global locations python:here.Locations;
				  	global mediaMaster python:here.mediaMaster;
				  	global empty python:''" tal:replace="nothing"></span>

I feel like I need to "know too much" about things to make this work. It 
turns out 'here' didn't like the __getitem__ interface, so I tried 
__getattr__. 'modules' on the other hand wants __getitem__. For what 
it's worth (I didn't know about the survey until today) the trailing 
slash seems better in that it would 'do the right thing' whereas python 
requires that you know how to get things differently in different 
contexts.

-steve

On Wednesday, May 23, 2001, at 08:38 AM, Evan Simpson wrote:

> From: "Steve Spicklemire" <steve@spvi.com>
>> <span tal:define=" global Batch modules/ZTUtils/Batch/;
>>   global theCatalog  here/Catalog/;
>>   global artists here/Artists/;
>>   global locations here/Locations/;
>>   global mediaMaster here/mediaMaster/;
>>   global empty python:''" tal:replace="nothing"></span>
>
> Trailing-slash-as-nocall was rejected pretty soundly in the recent 
> survey,
> so the trailing slashes in this are causing the error.  To get the Batch
> class without calling it, you need "global Batch
> python:modules['ZTUtils'].Batch".
>
> Cheers,
>
> Evan @ digicool
>
>
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt