On Mon, Aug 23, 2010 at 12:29 PM, Terry Brown <[email protected]> wrote:
> I accidentally nerfed my [email protected] folder, so sorry this 
> isn't attached to the earlier thread, but here's a simple bit of code:
>
>    from models_base import *
>    from models_auto import *
>
>    def name_unicode(self):
>        return self.name
>
>    Context.__unicode__ = name_unicode
>    Shape_type.__unicode__ = name_unicode
>    Lake.__unicode__ = name_unicode
>
>    def cl_unicode(self):
>        return u"%s->%s" % (self.context.name, self.shape_type.name)
>
>    Context_link.__unicode__ = cl_unicode
>
> which, when parsed into nodes by the @auto importer, gets horribly jumbled 
> from an interpretation point of view.
>
> So, is it my fault for not putting all the *.__unicode__ = * lines at the 
> end, or should Leo not try and guess how to associate def's and declarations?
>
> Just thought a concrete real world example would extend the debate.

Your fault or no, Leo should not jumble code it doesn't agree with, I consider
this a serious bug.

A previous thread died due to lack of consensus ISTR.

If Leo just created "Declaration" nodes as needed it would be adequate,
if retaining potential for improvement.

Thanks,
Kent

>
> Cheers -Terry
>
> --
> You received this message because you are subscribed to the Google Groups 
> "leo-editor" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/leo-editor?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to