mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-09-13 13:49:54 +00:00
Simplify negative list expansion
Signed-off-by: Felix Conway <[email protected]>
This commit is contained in:
@@ -74,10 +74,7 @@ def combination_two_lists(first_vals: List[T], second_vals: List[T]) -> List[Tup
|
||||
|
||||
def expand_list_negative(values: List[str]) -> List[str]:
|
||||
"""Adds the negative of every element in the list to the list"""
|
||||
new_list = []
|
||||
for value in values:
|
||||
new_list.extend([value, f"-{value}"])
|
||||
return new_list
|
||||
return values + [f"-{value}" for value in values]
|
||||
|
||||
def bits_to_limbs(bits: int, bits_in_limb: int) -> int:
|
||||
""" Return the appropriate ammount of limbs needed to store
|
||||
|
||||
Reference in New Issue
Block a user