On Tue, Jun 15, 2010 at 11:46 AM, Edward K. Ream <[email protected]> wrote: > On Tue, Jun 15, 2010 at 11:28 AM, Terry Brown <[email protected]> wrote: > >> True, but I don't think there's any way @auto can know which def node a >> declaration belongs to, and I really don't think it should guess and >> potentially hide critical information. > > Imo, the cure is worse than the disease. Too many nodes would be a > really bad thing. One can contrive situations in which the "active" > code will be pretty hidden no matter what we do. I think we have to > live with it. > > Having said that, I do think that synonyms that follow a def belong in > the node containing the def. This has annoyed be for a very long > time. A bug should be filed. And fixed.
After starting this thread, I think someone else should file the bug, since the example I started with seems to be considered correct, the only behaviour to be addressed is the which def node to put synonyms in, a use case I haven't encountered. It's fairly rare for me to sprinkle comments and statements between defs, so my concern was with their disappearance. I can see however that a file can be contrived which would be confusing in the other direction. I think that for my files, I would prefer nodes indicating the location of sprinklings to trying to remember if they exist and which def node I should look in. A hard one to resolve it seems. It seems that most Python code I look at doesn't do a great deal of sprinkling, but I suppose it's out there. Is it considered good / bad style to do this? What about properties? foo = property(f1) just stick them with a nearby def? > > Edward > > -- > 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.
