mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
do_cmd_versionchanged():
Added support for optional parameter explaining the change that was made in the specified version.
This commit is contained in:
parent
e06d025e00
commit
52e7684af1
1 changed files with 6 additions and 1 deletions
|
@ -281,8 +281,13 @@ sub do_cmd_versionadded{
|
|||
sub do_cmd_versionchanged{
|
||||
# one parameter: \versionchanged{version}
|
||||
local($_) = @_;
|
||||
my $explanation = next_optional_argument();
|
||||
my $release = next_argument();
|
||||
return "\nChanged in version $release.\n" . $_;
|
||||
my $text = "\nChanged in version $release.\n";
|
||||
if ($release) {
|
||||
$text = "\nChanged in version $release:\n$explanation.\n";
|
||||
}
|
||||
return $text . $_;
|
||||
}
|
||||
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue