Aviral Srivastava <avi.srivastava254...@gmail.com> added the comment:
But how do I generate the endline no? Initially, I could do, stack[-1][0].end_lineno = start[0] - 1 but how do I this now? Best, Aviral Srivastava LinkedIn <https://mailtrack.io/trace/link/c4502b41561cd995471aa8291b55e07212663a68?url=https%3A%2F%2Fwww.linkedin.com%2Fin%2Fsriavi%2F&userId=762683&signature=7970b62394c71d67> | Website <https://mailtrack.io/trace/link/91745120231e6a5490b7cad9769cf43b37257fe4?url=https%3A%2F%2Faviralsrivastava.com%2F&userId=762683&signature=b0d6da90458944b7> On Thu, Jan 14, 2021 at 11:12 AM Batuhan Taskaya <rep...@bugs.python.org> wrote: > > Batuhan Taskaya <isidenti...@gmail.com> added the comment: > > It is actually much easier now, considering that we are operating on the > AST instead of the token stream. You probably only have to add a new field > to Function/Class classes for end_lineno and access .end_lineno attribute > here just like how we do for .lineno > > https://github.com/python/cpython/blob/971235827754eee6c0d9f7d39b52fecdfd4cb7b4/Lib/pyclbr.py#L212-L214 > <https://mailtrack.io/trace/link/fcde5f4006527669633139919288094eb35d4671?url=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fblob%2F971235827754eee6c0d9f7d39b52fecdfd4cb7b4%2FLib%2Fpyclbr.py%23L212-L214&userId=762683&signature=3181a7c4de5a239b> > > ---------- > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <https://bugs.python.org/issue42920 > <https://mailtrack.io/trace/link/a14e8d641bc2744efb70ac68058359d310914537?url=https%3A%2F%2Fbugs.python.org%2Fissue42920&userId=762683&signature=ef176fb5cb5491fd> > > > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42920> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com