Package lepl :: Package contrib :: Module matchers :: Class SmartSeparator2
[hide private]
[frames] | no frames]

Class SmartSeparator2

source code


A substitute Separator with different semantics for optional matchers. This identifies optional matchers by type (whether they subclass BaseSearch) and then constructs a replacement that adds space only when both matchers are used.

See also SmartSeparator1, which is more general but less efficient.

Instance Methods [hide private]
 
_replacements(self, separator)
Provide alternative definitions of '&` and [].
source code

Inherited from matchers.operators._BaseSeparator: __init__

Inherited from matchers.operators._BaseSeparator (private): _repeat

Inherited from support.context.Scope: __enter__, __exit__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_replacements(self, separator)

source code 
Provide alternative definitions of '&` and [].
Overrides: matchers.operators._BaseSeparator._replacements