Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python partial

>>> from functools import partial
>>> basetwo = partial(int, base=2)
>>> basetwo.__doc__ = 'Convert base 2 string to an int.'
>>> basetwo('10010')
18
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #python #partial
ADD COMMENT
Topic
Name
7+6 =