Any other Python flaws?

Alex Martelli aleaxit at yahoo.com
Sat Jun 16 05:18:35 EDT 2001


"Bengt Richter" <bokr at accessone.com> wrote in message
news:3b2a7edd.586265184 at wa.news.verio.net...
> On Thu, 14 Jun 2001 20:26:10 -0400, "Steve Holden"
> <sholden at holdenweb.com> wrote:
> [...]
> >Despite the fact that our Fearless Leader and BDFL has already revered
> >himself once on this issue, I'd like to see strict syntactical equity
> >between function definitions and class definitions, which is to say that
a
> >class with no superclasses should be declarable as:
> >
> >    class myClass():
> >        pass
>
> Why not the other way around? I.e., drop the mandatory "()"
> for function defs with no args. A bare 'foo' could still
> evaluate to <function foo at 007F308C> and foo() would do
> what it does now.

IMHO that would be just as good.  Best would (again IMHO)
to have OPTIONAL parentheses at CREATION time only of both
baseless classes and argless functions, but any solution that
lets one use the same syntax in either case would be OK by me.


Alex






More information about the Python-list mailing list