[Zope3-dev] Re: Script (Python),
was Re: [Zope-dev] Re: Zope 3 Newsletter: Issue 10
Jim Fulton
jim at zope.com
Mon Sep 8 06:16:28 EDT 2003
Jeffrey P Shell wrote:
> On Sunday, September 7, 2003, at 06:22 AM, Jim Fulton wrote:
>
>> Jim Fulton wrote:
>> ...
>>
>>> The question is whether the site scripter should use module-like things
>>> or things like the Zope 2 script python. Personally, I'd like to see
>>> something more like modules.
>>
>>
>> There is a third alternative. There could be Python things that were
>> truly
>> scripts. One of the things I don;t like about "script python" is that
>> they
>> are a bit like scripts and a bit like menthods. It always bothered me
>> that
>> they don't act like anything familiar in Python.
>
>
> What is familiar with Python?
>
> A Python file can be a module, executable script, or both.
Right. A "script python" is neither. It is a method that
pretends not to be. It uses a "return" statement, unlike
a script or module. It has no "def" statement, unlike a method.
You can't define any names, unlike a module. There are multiple
"extra" bound arguments, unlike a method. Of course, you can't
actually see these, so maybe they don't count. ;) Oh yeah,
and there an extra column of spaces added for you (to work with
the def statement that's added for you), to mess up your triply-
quoted strings.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (703) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list