Typed Python?

Jacek Generowicz jacek.generowicz at cern.ch
Tue Jul 6 07:18:27 EDT 2004


Jeremy Bowers <jerf at jerf.org> writes:

> On Mon, 05 Jul 2004 15:02:59 +0200, Peter Maas wrote:
> > You mean the expression
> > 
> > "(set! x 10)" is_better_structured_as "x=10"
> > 
> > is true? How is is_better_structured_as defined? :)
> 
> def is_better_structured_than(a, b): # take Peter's suggestion
>     "Returns true if a is better structured than b."
>     if not equivalent(a, b):
>         raise ThatsNotFairError
> 
>     return len(a) > len(b)
> 
> 
> (It is the only logical interpretation of the statement since in any sane
> parse tree of the two on some fair ground they are indistinguistable. If
> you don't like this logic, Jacek,

I love your assertion (re parse tree); you have failed to show me your
logic ... but given that your logic appears to lead you to conclude
that structure "quality" is somehow directly related to string length[*],
I must admit that it seems to me that your logic probably sucks.

:-)


[*] As opposed to, for example, simplicity of transformation to parse
    tree.



More information about the Python-list mailing list