Zope supports Python builin functions?
Hi, Does Zope support Python builtin functions outside External Methods? I made a DTML Methode with juste one line: <dtml-var "4==5"> after clicking on the view tab I got: 0 Perfect. Then I change the line to: <dtml-var "type([])==type({})"> Viewing it displays: ************ Zope Error Zope has encountered an error while publishing this resource. Error Type: NameError Error Value: type etc....... ************ I know the test is stupid, i just wanted to know if it was possible to use Python builin function inside a simple DTML Method. I understand it's not. Is it right?
picasso@videotron.ca wrote: [can't use type()]
I know the test is stupid, i just wanted to know if it was possible to use Python builin function inside a simple DTML Method. I understand it's not. Is it right?
*Most* of the builtins are available as methods of '_', so that you can use '_.int()' for example. Some are omitted, and I'm not sure why. 'type' is certainly harmless, for instance. I *think* that 'tuple', 'list', 'map', and 'filter' were left out for the same reason 'range' was restricted -- to prevent excessive looping.
participants (2)
-
Evan Simpson -
picasso@videotron.ca