This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lovi
Recipients lovi
Date 2019-12-14.04:43:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576298636.18.0.950547793455.issue39043@roundup.psfhosted.org>
In-reply-to
Content
I think it's appropriate to add the generator fib() to the math module. With fib(), some operations will be easier.

The generator is like this:

def fib(count=None):
    if count is not None and not isinstance(count, int):
        raise ValueError(f"Parameter count has an unexpected type: {count.__class__.__name__}.")
    a, b = 0, 1
    while True:
        a, b = b, a + b
        if count is not None:
            if not count:
                return
            count -= 1
        yield a
History
Date User Action Args
2019-12-14 04:43:56lovisetrecipients: + lovi
2019-12-14 04:43:56lovisetmessageid: <1576298636.18.0.950547793455.issue39043@roundup.psfhosted.org>
2019-12-14 04:43:56lovilinkissue39043 messages
2019-12-14 04:43:55lovicreate