[issue38307] Add .end_lineno attribute to pyclbr _Objects

2022-03-19 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue38307] Add .end_lineno attribute to pyclbr _Objects

2021-02-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 000cde59847beaf5fa7b73633e1f3c898fe5bf90 by Aviral Srivastava in branch 'master': bpo-38307: Add end_lineno attribute to pyclbr Objects (GH-24348) https://github.com/python/cpython/commit/000cde59847beaf5fa7b73633e1f3c898fe5bf90 -- __

[issue38307] Add .end_lineno attribute to pyclbr _Objects

2021-01-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: If IDLE were to recalculate the end from start, it would have to more or less parse forward to find the end of the statement. This is why I considered it a speculative wish. > would `end_lineno=None` make any sense? Only as a kludge if a default were requ

[issue38307] Add .end_lineno attribute to pyclbr _Objects

2021-01-27 Thread Aviral Srivastava
Aviral Srivastava added the comment: Hey Terry, thanks for commenting. I have a few questions to ask you, please pardon my lack of awareness. >This requieres end lines and having it be an attribute is easier and more >accurate than recalculating it. How do you recalculate the end_lineno?

[issue38307] Add .end_lineno attribute to pyclbr _Objects

2021-01-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: The answer, Aviral discovered, is that current ast nodes have end_lineno attributes, so the patch amounts to consistently copying them. I don't understand Aviral's use case either, but an item on my IDLE wish list is to be able to move class and function de