I would like to sometimes put the types on things in both the parameter list as well as return types.
For return types, there is actually an rtype: docstring entry in addition to the returns: string.
For parameters, I'm looking online and it seems like they put it in () before the variable name.
Is this going to fuck up your software?
def RGB(red, green, blue):
"""
Given integer values of Red, Green, Blue, return a color string "#RRGGBB"
:param (int) red: int: Red portion from 0 to 255
:param (int) green: int: Green portion from 0 to 255
:param (int) blue: int: Blue portion from 0 to 255
:return: A single RGB String in the format "#RRGGBB" where each pair is a hex number.
:rtype (str)
"""
return '#%02x%02x%02x' % (red, green, blue)
For now I'll remove the rtype parameter since it's not expected by your software. I'll instead put it in () after the :return: like this:
":return: (str) A single RGB String.....
I would like to sometimes put the types on things in both the parameter list as well as return types.
For return types, there is actually an
rtype:
docstring entry in addition to thereturns:
string.For parameters, I'm looking online and it seems like they put it in () before the variable name.
Is this going to fuck up your software?
For now I'll remove the rtype parameter since it's not expected by your software. I'll instead put it in () after the
:return:
like this:":return: (str) A single RGB String.....