httk.core.datastream.textstream_string_view

Classes

TextstreamStringView

A view presenting an underlying data streaming as a string.

Module Contents

class httk.core.datastream.textstream_string_view.TextstreamStringView(obj, **hints)

Bases: httk.core.datastream.textstream_view.TextstreamView, str

A view presenting an underlying data streaming as a string. This view can be used both to pass a string in place of streaming data, and for reading streaming data into a string. Note: this view is not lazy (this is impossible for views inherting str, since str is immutable), hence all the streaming data is read immedately upon creating this view.

Parameters:
unwrap()

Return the raw representation of the wrapped backend.

Returns:

The backend’s most raw available representation.

Return type:

Any

unview()

Return the presented text as a plain string.

Returns:

A plain string containing the presented text.

Return type:

str