UserLinux chooses Python as "interpretive language" of choice

John Roth newsgroups at jhrothjr.com
Sat Dec 20 12:27:57 EST 2003


"David M. Wilson" <dw-google.com at botanicus.net> wrote in message
news:99dce321.0312200919.3dd4af66 at posting.google.com...
> "John Roth" <newsgroups at jhrothjr.com> wrote...
>
> > What I'm missing, however, is any *thoughtful*
> > discussion of the issues involved. Your [perjoritive
> > adverb deleted] response makes it clear that you
> > didn't think of the issues, you just reacted.
>
> The point he was making (in a rather convoluted way) is that optional
> parens is against the Python philosophy. "Explicit rather than
> implicit" being line 2. I would rather be forced to use empty parens
> after a function call - it shows you/others exactly what you are
> trying to do.
>
> On the other hand, I would detest Python if by simply referring to an
> object with a __call__ method caused it to be executed. I'd say that's
> closer to braindead.
>
>    a = sys.exit
>    a
>
> Unless you design some silly rules to determine when empty parenthesis
> should be allowed - did a get assigned the return value of sys.exit()?
>  (yes I know it doesn't have one), or did some silly unclear
> (implicit) rules stop that from happening. Did sys.exit() run on the
> second line?
>
> I think if you can't understand why this option isn't provided for
> you, then you misunderstand some of the most fundamental Python
> concepts. import this.

I don't think I misunderstand it. As I've said several times in this
thread, I am not seriously advocating it for a number of reasons.

However, yours is not one of them. It's easy enough to distinguish
between a function and some other kind of object that simply has
a __call__ method. Functions provide the number of parameters
they are expecting, other callables don't, so it would indeed be
brain dead to expect an absent call parameter to call something
other than a function. Also, to make it crystal clear, to call anything
other than a function that is expecting no parameters.

Please think before making a critique.

John Roth
>
>
> David.






More information about the Python-list mailing list