Pwhite

class supriya.tools.patterntools.Pwhite(minimum=0.0, maximum=1.0, repetitions=None)[source]

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=1, group=0, label=object, shape=box]; } subgraph cluster_patterntools { graph [label=patterntools]; "supriya.tools.patterntools.Pattern.Pattern" [color=2, group=1, label=Pattern, shape=oval, style=bold]; "supriya.tools.patterntools.Pwhite.Pwhite" [color=black, fontcolor=white, group=1, label=<<B>Pwhite</B>>, shape=box, style="filled, rounded"]; "supriya.tools.patterntools.Pattern.Pattern" -> "supriya.tools.patterntools.Pwhite.Pwhite"; } subgraph cluster_systemtools { graph [label=systemtools]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" [color=3, group=2, label=AbstractBase, shape=box]; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" [color=3, group=2, label=SupriyaObject, shape=box]; "supriya.tools.systemtools.SupriyaValueObject.SupriyaValueObject" [color=3, group=2, label=SupriyaValueObject, shape=box]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" -> "supriya.tools.systemtools.SupriyaObject.SupriyaObject"; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" -> "supriya.tools.systemtools.SupriyaValueObject.SupriyaValueObject"; } "builtins.object" -> "supriya.tools.systemtools.SupriyaObject.AbstractBase"; "supriya.tools.systemtools.SupriyaValueObject.SupriyaValueObject" -> "supriya.tools.patterntools.Pattern.Pattern"; }

Attribute summary

arity Gets arity of Pwhite.
is_infinite
maximum
minimum
repetitions
__add__(expr) Adds expr to pattern.
__copy__(*args)
__div__(expr)
__eq__(expr)
__format__([format_specification]) Formats Supriya object.
__hash__()
__iter__()
__mul__(expr)
__pow__(expr)
__radd__(expr)
__rdiv__(expr)
__repr__() Gets interpreter representation of Supriya object.
__rmul__(expr)
__rpow__(expr)
__rsub__(expr)
__sub__(expr)

Read-only properties

Pwhite.arity

Gets arity of Pwhite.

>>> pattern = patterntools.Pwhite(0.0, 1.0)
>>> pattern.arity
1
>>> pattern = patterntools.Pwhite([0.0, 0.1], 2)
>>> pattern.arity
2

Returns integer.

Pwhite.is_infinite
Pwhite.maximum
Pwhite.minimum
Pwhite.repetitions

Special methods

(Pattern).__add__(expr)

Adds expr to pattern.

>>> pattern = patterntools.Pseq([1, 2, 3])
>>> expr = patterntools.Pseq([0, 10])
>>> list(pattern + expr)
[1, 12]
>>> expr = 10
>>> list(pattern + expr)
[11, 12, 13]
>>> expr = [10, [100, 1000]]
>>> list(pattern + expr)
[[11, [101, 1001]], [12, [102, 1002]], [13, [103, 1003]]]
>>> pattern = patterntools.Pseq([[1, [2, 3]], [[4, 5], 6, 7]])
>>> expr = [10, [100, 1000]]
>>> for x in (pattern + expr):
...     x
...
[11, [102, 1003]]
[[14, 15], [106, 1006], 17]
(SupriyaValueObject).__copy__(*args)
(Pattern).__div__(expr)
(SupriyaValueObject).__eq__(expr)
(SupriyaObject).__format__(format_specification='')

Formats Supriya object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

(SupriyaValueObject).__hash__()
(Pattern).__iter__()
(Pattern).__mul__(expr)
(Pattern).__pow__(expr)
(Pattern).__radd__(expr)
(Pattern).__rdiv__(expr)
(SupriyaObject).__repr__()

Gets interpreter representation of Supriya object.

Returns string.

(Pattern).__rmul__(expr)
(Pattern).__rpow__(expr)
(Pattern).__rsub__(expr)
(Pattern).__sub__(expr)