On Sun, Nov 27, 2016 at 4:15 AM, Edward K. Ream <[email protected]> wrote:
On Sat, Nov 26, 2016 at 12:50 PM, rengel <[email protected]> > wrote: > > > > > I still don't understand why you are struggling with the newline > characters at all. > > Many thanks for this. You have uncovered a blind spot in my thinking. > True, but now I *do* understand why I am *not *going to make the changes! As elegant as changes the changes seem, my background mind has been *screaming* at me that they are a bad, bad, bad idea. I inserted a new_lines switch in linescanner.py and actually starting converting the code to the new way. And then, suddenly, I *did* understand why my background mind was screaming. Using s.splitlines forks Leo's code. You could call it a hidden mode bit. All future maintainers would have to *remember* that the importers *must* use s.splitlines instead of g.splitLines. Sure, the new code i s better locally . But global consistency is *way* more important. Besides, the proposed changes have no practical impact, whereas effort required to change and test the code are substantial. I've spent decades using g.splitLines. It's *everywhere* in Leo's code. I'm not about to start using two different conventions for lists of lines. It *might* have been been better to have used s.splitllines instead of g.splitLines. But no, s.splitlines's bool argument is *another* mode bit. That bool would again fork pieces of Leo's code. *Summary* Leo's code handles lists of lines consistently everywhere. That should remain a strict principle, especially for major components such as Leo's importers. We'll just have to live with whatever slight inconveniences the global consistency entails. It's ok to use s.splitlines in local situations, provided that doing so has no global impacts. EKR -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
