Class
zope.app.undo.Prefix

A prefix is equal to any string it is a prefix of.

This class can be compared to a string (or arbitrary sequence). The comparison will return True if the prefix value is a prefix of the string being compared.

Two prefixes cannot safely be compared.

It does not matter from which side you compare with a prefix:

>>> p = Prefix('str')
>>> p == 'string'
True
>>> 'string' == p
True

You can also test for inequality:

>>> p != 'string'
False
>>> 'string' != p
False

Unicode works, too:

>>> p == u'string'
True
>>> u'string' == p
True
>>> p != u'string'
False
>>> u'string' != p
False
>>> p = Prefix('foo')
>>> p == 'bar'
False
>>> 'bar' == p
False
>>> p != 'bar'
True
>>> 'bar' != p
True
>>> p == None
False

Base classes

Implemented Interfaces

There are no implemented interfaces.

Attributes/Properties

There are no attributes in this class.

Methods

Known Subclasses

There are no known subclasses.