diff Doc/partparse.py @ 2038:5983d2db5904 legacy-trunk

Can't remember the reason for the change, but it was necessary. :-)
author Sjoerd Mullender <sjoerd@acm.org>
date Wed, 14 Dec 1994 15:28:22 +0000
parents 907605320a5f
children 7d70209f355d
line wrap: on
line diff
--- a/Doc/partparse.py	Wed Dec 14 15:27:33 1994 +0000
+++ b/Doc/partparse.py	Wed Dec 14 15:28:22 1994 +0000
@@ -1080,7 +1080,7 @@
 	idxsi = hist.indexsubitem	# words
 	command = ''
 	cat_class = ''
-	if idxsi and idxsi[-1] == 'method':
+	if idxsi and idxsi[-1] in ('method', 'attribute'):
 		command = 'defmethod'
 		cat_class = string.join(idxsi[:-1])
 	elif len(idxsi) == 2 and idxsi[1] == 'function':
@@ -1170,10 +1170,10 @@
 	command = ''
 	cat_class = ''
 	class_class = ''
-	if len(idxsi) == 2 and idxsi[1] == 'attribute':
+	if idxsi[-1] == 'attribute':
 		command = 'defcv'
 		cat_class = 'attribute'
-		class_class = idxsi[0]
+		class_class = string.join(idxsi[:-1])
 	elif len(idxsi) == 3 and idxsi[:2] == ['in', 'module']:
 		command = 'defcv'
 		cat_class = 'data'