Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More updates to common functionalities
Browse files Browse the repository at this point in the history
divergentdave committed Oct 25, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
zakkak Foivos Zakkak
1 parent 57f83d0 commit 54fa29c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions draft-irtf-cfrg-vdaf.md
Original file line number Diff line number Diff line change
@@ -827,7 +827,7 @@ Some common functionalities:
* `byte(x: int) -> bytes` returns the representation of the integer `x` in range
`[0, 256)` as a single-byte byte string.

* `cast(typ: type, x: object) -> object` returns the input value unchanged.
* `cast(typ: type[T], x: object) -> T` returns the input value unchanged.
This is only present to assist with static analysis of the Python code.
Type checkers will ignore the inferred type of the input value, and assume
the output value has the given type.
@@ -855,11 +855,11 @@ Some common functionalities:
* `next_power_of_2(x: int) -> int` returns the smallest integer
greater than or equal to `x` that is also a power of two.

* `range(stop)` or `range(start, stop[, step])` is the range function from the
Python standard library. The one-argument form returns the integers from zero
(inclusive) to `stop`, exclusive. The two- and three-argument forms allow
overriding the start of the range and overriding the step between successive
output values.
* `range(stop: int)` or `range(start: int, stop: int[, step: int])` is the range
function from the Python standard library. The one-argument form returns the
integers from zero (inclusive) to `stop`, exclusive. The two- and
three-argument forms allow overriding the start of the range and overriding
the step between successive output values.

* `to_be_bytes(x: int, len: int) -> bytes` converts an integer `x` whose value
is in the range `[0, 2^(8*len))` to a big-endian, `len`-byte string.

0 comments on commit 54fa29c

Please sign in to comment.