On Friday, July 14, 2017 at 10:08:35 AM UTC-5, Edward K. Ream wrote: Only two lines of code were changed, but* they are major changes to Leo's > read/write code*. >
I also refactored two sections into a new method: fc.compute_attribute_bits. All such refactorings are much safer now that pyflakes and pylint check my every move. Imo, section references is clearly the very worst idea that the usually-brilliant Donald Knuth ever had. They are wretched engineering: - They obscure knowledge of what data functions/methods use and return. - Data can unexpected "bleed" into surrounding code. - They can't be unit tested properly. As a result, I am gradually converting such evil sections into proper methods. Doing so allows *encapsulated* code improvements. For example, I replaced string concatenation using the attr var by list append using the bits var. This would be dangerous in a section definition. But pyflakes will reliably check this in a function def. As a result, the supremely important fc.putVnode is now simpler and clearer. Edward -- 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.
