|
From: Richard J. <rj...@ek...> - 2002-05-06 01:11:47
|
I've got some problems in parsing a document. The following biblio element
results in errors:
>>>>> snip
:Organization: Computer and Information Sciences::
New Jersey Institute of Technology
University Heights
Newark, NJ, 07102
(address obsolescent).
<<<<< snip
Reporter: WARNING (2) Literal block expected at line 2; none found.
Reporter: WARNING (2) Cannot extract compound bibliographic field
"Organization".
I've hit another error in a definition list... note the line number the error
is reported at, and the line that is actually erroneous (the last one).
>>>>> snip
S.member(ob), D.member(arg,map), G.member(src,dst)
respectively are membership tests for the types. Each returns 1 if the
object or pair are members of the structure or 0 otherwise.
S.add(ob), D.add(arg,map), G.add(src,dst)
respectively add new members to the object. These are equivalent to
G[src]=dst, D[arg]=map, S[ob]=1 but the former may be preferrable for
graphs and sets since they are less misleading. This is an "in
place" mutation operation -- it will raise an error if the object has
been hashed.
X.items()
returns a list of the members of the structure. For example::
>>> X = kjSet([0, 1, 2, 0, 1])
>>> X.items()
[1, 0, 2]
>>> X = kjGraph([(3, 0), (2, 2), (1, 2), (2, 0), (2, 0), (3, 0)])
>>> X.items()
[(1, 2), (3, 0), (2, 2), (2, 0)]
G.keys(), G.values()
return the left members and right members of pairs in the graph G
respectively. For example::
>>> G = kjGraph([(4, 8), (0, 9), (1, 10), (4, 9), (3, 7), (3, 8), (2,
>>> 7)])
>>> G.keys()
[4, 0, 1, 3, 2]
>>> G.values()
[8, 9, 10, 9, 7, 8, 7]
Note that keys eliminates redundancies, whereas values does not. These
functions are also defined for dictionaries but are not defined for
sets.
<<<<< snip
Reporter: WARNING (2) Definition list ends without a blank line; unexpected
unindent at line 5.
Richard
|