valleyjudge.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:valleyjudge 作者: dcolascione 项目源码 文件源码
def __init__(self,
                 *,
                 total,
                 start = None,
                 vesting_dates = DEFAULT_VESTING_DATES,
                 vesting = (0.25, 0.25, 0.25, 0.25)):
        """Create an equity grant description.

        TOTAL is the total size, in dollars, of the grant.  START is
        the date on which it starts; if None, the grant clock starts
        on the company start date.  VESTING_DATES is a sequence of
        (MONTH, DAY) pairs on which equity grants vest --- a grant
        that vests quarterly will have a four-element
        VESTING_DATES sequence.

        VESTING is a sequence of numbers that sum to 1.0.  With default
        vesting dates, each one represents a year over which the grant vests, 
        and the value of the number indicates the portion of the grant that 
        vests in that year.

        """
        self.total = typecheck(total, numbers.Real)
        self.start = typecheck(start, (date, timedelta, type(None)))
        self.vesting_dates = typecheck(vesting_dates, seq_of(pair_of(int)))
        self.vesting = typecheck(vesting, seq_of(numbers.Real))
        if not math.isclose(sum(vesting), 1.0, rel_tol=1e-5):
            raise ValueError("vesting fractions do not sum to 1: %1.5f" % sum(vesting))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号