GNU bug report logs -
#70609
30.0.50; [PATCH] New function 'python-shell-send-block' for python-mode
Previous Next
Reported by: Lin Sun <sunlin7.mail <at> gmail.com>
Date: Sat, 27 Apr 2024 14:16:07 UTC
Severity: normal
Tags: patch
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 70609 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii wrote:
>
> > From: Lin Sun <sunlin7.mail <at> gmail.com>
> > Date: Sat, 27 Apr 2024 14:14:06 +0000
> >
> > Here is a function 'python-shell-send-block' to send a block to the
> > python interpreter in python mode, it's similar to
> > `python-shell-send-defun` but works on block.
> >
> > The implementation and testing are included in that patch.
> >
> > Please help review the changes.
> >
> > [PATCH] New function 'python-shell-send-block' for python-mode
> >
> > * lisp/progmodes/python.el: Add implemention of the function.
> > * test/lisp/progmodes/python-tests.el: Test case for the function.
> > * etc/NEWS: Document for the function.
>
> kobarity, any comments?
I think `python-shell-send-block' itself is good, but there may be
room for improvement in the test case.
It is better not to use f-strings as much as possible because it
depends on the Python version.
`python-tests-look-at' is basically for moving point. Since it looks
for the next occurrence of the specified string, it may move the point
to an unexpected location. For testing, it would be better to use
`looking-at', etc. or compare the point after moving with
`python-tests-look-at' to the expected value.
This bug report was last modified 1 year and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.