summaryrefslogtreecommitdiffstats
path: root/Doc/perl/python.perl
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-05-17 15:00:32 (GMT)
committerFred Drake <fdrake@acm.org>1999-05-17 15:00:32 (GMT)
commit3e4c614c16fdbf19504bbf54395a767457ab10f6 (patch)
treeab4a9cbb69b9bfa0a3f5642e47a449ffbda81311 /Doc/perl/python.perl
parent66823029a48afaea4513d70bac7480af21b8906f (diff)
downloadcpython-3e4c614c16fdbf19504bbf54395a767457ab10f6.zip
cpython-3e4c614c16fdbf19504bbf54395a767457ab10f6.tar.gz
cpython-3e4c614c16fdbf19504bbf54395a767457ab10f6.tar.bz2
define_module(): Check the module type for validity before using.
This reflects the changes made in ../texinputs/python.sty.
Diffstat (limited to 'Doc/perl/python.perl')
-rw-r--r--Doc/perl/python.perl6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl
index 12c7d0a..307944e 100644
--- a/Doc/perl/python.perl
+++ b/Doc/perl/python.perl
@@ -493,6 +493,12 @@ $THIS_CLASS = '';
sub define_module{
my($word,$name) = @_;
my $section_tag = join('', @curr_sec_id);
+ if ($word ne "built-in" && $word ne "extension"
+ && $word ne "standard" && $word ne "") {
+ write_warnings("Bad module type '$word'"
+ . " for \\declaremodule (module $name)");
+ $word = "";
+ }
$word = "$word " if $word;
$THIS_MODULE = "$name";
$INDEX_SUBITEM = "(in $name)";