Michael Gold
2024-06-22 22:50:01 UTC
Package: python3-doc
Version: 3.11.8-1
Severity: minor
Dear Maintainer,
The documentation for curses.wrapper says:
Initialize curses and call another callable object, func, which
should be the rest of your curses-using application. If the
application raises an exception, this function will restore the
terminal to a sane state before re-raising the exception and
generating a traceback. The callable object func is then passed the
main window âstdscrâ as its first argument, followed by any other
arguments passed to wrapper(). Before calling func, wrapper() turns
on cbreak mode, turns off echo, enables the terminal keypad, and
initializes colors if the terminal has color support. On exit
(whether normally or by exception) it restores cooked mode, turns on
echo, and disables the terminal keypad.
I see several minor problems with this.
1) It doesn't say anything about what's returned on success. The code
has the line 'return func(âŠ)', as expected of a wrapper, which is to
say that it will return whatever the wrapped function returns.
2) There's no code to "generat[e] a traceback". I guess the assumption
is that the re-raised assumption will not be caught, and Python will
do that; but using curses.wrapper that way is merely a suggestion
("func[âŠ] should be the rest"âŠ).
3) It says "re-raising the exception and generating a traceback. The
callable object func is then passed the main window". Despite saying
"then", this is not a linear sequence of events that can happen.
4) "On exit" is unclear about whether it's talking about function exit
or program exit.
- Michael
-- System Information:
Debian Release: trixie/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 6.8.12-amd64 (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages python3-doc depends on:
ii python3.11-doc 3.11.9-1
python3-doc recommends no packages.
Versions of packages python3-doc suggests:
ii python3 3.11.8-1
pn python3-examples <none>
-- no debconf information
Version: 3.11.8-1
Severity: minor
Dear Maintainer,
The documentation for curses.wrapper says:
Initialize curses and call another callable object, func, which
should be the rest of your curses-using application. If the
application raises an exception, this function will restore the
terminal to a sane state before re-raising the exception and
generating a traceback. The callable object func is then passed the
main window âstdscrâ as its first argument, followed by any other
arguments passed to wrapper(). Before calling func, wrapper() turns
on cbreak mode, turns off echo, enables the terminal keypad, and
initializes colors if the terminal has color support. On exit
(whether normally or by exception) it restores cooked mode, turns on
echo, and disables the terminal keypad.
I see several minor problems with this.
1) It doesn't say anything about what's returned on success. The code
has the line 'return func(âŠ)', as expected of a wrapper, which is to
say that it will return whatever the wrapped function returns.
2) There's no code to "generat[e] a traceback". I guess the assumption
is that the re-raised assumption will not be caught, and Python will
do that; but using curses.wrapper that way is merely a suggestion
("func[âŠ] should be the rest"âŠ).
3) It says "re-raising the exception and generating a traceback. The
callable object func is then passed the main window". Despite saying
"then", this is not a linear sequence of events that can happen.
4) "On exit" is unclear about whether it's talking about function exit
or program exit.
- Michael
-- System Information:
Debian Release: trixie/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 6.8.12-amd64 (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages python3-doc depends on:
ii python3.11-doc 3.11.9-1
python3-doc recommends no packages.
Versions of packages python3-doc suggests:
ii python3 3.11.8-1
pn python3-examples <none>
-- no debconf information