Blueprint
- class blaupause.Blueprint(count, participants, name='standard')
This is a small class without any practical use case.
This class has no useful functionality apart from learning how to write documentation for a class.
- Parameters
count (numbers.real) – Number of items.
participants (numbers.real) – Number of participants. Must be larger than zero.
name (str) – Task name. Defaults to
standard
.
- Raises
ValueError – If
participants
is not larger than zero.
Examples
>>> from blaupause import Blueprint >>> bp = Blueprint(count=3, participants=1) >>> bp Blueprint(count=3, participants=1, name=standard)
Methods summary
Add two instances of
MyClass
Operator +=
Return repr(self).
Method that does nothing.
Mean of the given value and class properties.
Prints
blueprint
.Attributes summary
Number of participants.
Divide a and b.
- __add__(other)
Add two instances of
MyClass
- __radd__(other)
Operator +=
- __repr__()
Return repr(self).
- do_nothing()
Method that does nothing.
This method does not do anything. Its only purpose is to have more methods in the documentation.
Mean of the given value and class properties.
This method computes the mean of the given value and the two values
a
andb
of the current instance ofMyClass
.- Parameters
value (numbers.real) – Third value to compute mean with.
- Returns
The mean.
- Return type
numbers.real
Examples
>>> from blaupause import Blueprint >>> bp = Blueprint(count=2, participants=3) >>> bp.mean_shares(4) 2.0
- static print_blueprint()
Prints
blueprint
.This method only prints the word
blueprint
. Used to have a static method in the documentation.
- property participants
Number of participants.
Divide a and b.
- Returns
a / b
- Return type
numbers.real
Examples
>>> from blaupause import Blueprint >>> bp = Blueprint(count=6, participants=2) >>> bp.shares 3.0