Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python typing as int or float

from typing import Union
# Usage:
Union[type1, type2]

# Exemple:
weight : Union[int, float]
# or
def return_triple( number : Union[int, float]) -> Union[int, float]:
	return number*2
 
PREVIOUS NEXT
Tagged: #python #typing #int #float
ADD COMMENT
Topic
Name
9+1 =