On Thursday, December 7, 2017 at 12:39:12 PM UTC-6, Edward K. Ream wrote:

4. Oops. At present the narrative lacks the following:
>
> class class LeoTagWidget(QtWidgets.QWidget):
>    def     def __init__(self,c,parent=None):
>    self=       self.tc = self.c.theTagController
>
> It would be easy to add a regex to detect that.
>

Done at 4c75a5d. The new pattern is:

    ('self.x=', re.compile(r'^\s*self\.\w+\s*=')),

And now the narrative contains, among other statements:

  class class LeoTagWidget(QtWidgets.QWidget):
    def     def __init__(self,c,parent=None):
self.x=         self.c=c
self.x=         self.tc=self.c.theTagController
self.x=         self.mapping={}
self.x=         self.search_re='(&|\\||-|\\^)'

Some/most of these assignments will be of no particular value.  
Furthermore, the "deductions" involved in:

self.x=         self.c=c
self.x=         self.tc=self.c.theTagController

this assignment are non-trivial for programs. But we humans can see clearly 
that self.tc is an instance of the TagController class. This is, imo, 
purely static type inference, and it should be possible to do it quickly!

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.

Reply via email to