| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
basestring --+
|
SourcedString --+
|
SimpleSourcedString
A single substring of a document, annotated with information about the location in the document where it was originally found. See SourcedString for more information.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| Splitting & Stripping Methods | |||
|---|---|---|---|
|
Inherited from |
|||
| String Concatenation Methods | |||
|
Inherited from |
|||
| Justification Methods | |||
|
Inherited from |
|||
| Replacement Methods | |||
|
Inherited from |
|||
| Unicode | |||
|
|||
|
Inherited from Inherited from |
|||
| Display | |||
|
Inherited from Inherited from |
|||
|
|||
| a new object with type S, a subtype of T |
|
||
| String Concatenation Methods | |||
|---|---|---|---|
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
| Splitting & Stripping Methods | |||
|---|---|---|---|
|
Inherited from |
|||
| Display | |||
|
Inherited from |
|||
|
|||
|
source A StringLocation specifying the location
where this string occured in the source document.
|
|||
|
|||
|
begin The document offset where the string begins. |
|||
|
end The document offset where the string ends. |
|||
|
docid An identifier (such as a filename) that specifies the document where the string was found. |
|||
|
sources A sorted tuple of (index, source) pairs.
|
|||
|
|||
|
Construct a new sourced string.
|
|
Helper for self.decode(). Returns a unicode-decoded version of
this SourcedString. This is used in the special case where the decoded string has the same length that the source string does. As a result, we can safely assume that each character is encoded with one byte; so we can just reuse our source. E.g., this will happen when decoding an ASCII string with utf-8.
|
|
|||
beginThe document offset where the string begins. (I.e., the offset of the first character in the string.) |
endThe document offset where the string ends. (For character offsets, one plus the offset of the last character; for byte offsets, one plus the offset of the last byte that encodes the last character). |
docidAn identifier (such as a filename) that specifies the document where the string was found. |
sourcesA sorted tuple of(index, source) pairs. Each such pair
specifies that the source of self[index:index+len(source)]
is source. Any characters for which no source is specified
are sourceless (e.g., plain Python characters that were concatenated to a
sourced string).
When working with simple sourced strings, it's usually easier to use
the |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Apr 11 14:39:51 2011 | http://epydoc.sourceforge.net |