"Lambert, David W (S&T)" <[EMAIL PROTECTED]> wrote: > > The "if" expression leads to long statements. Please offer suggestions > to beautify this function. For this example use maximum line length > marked by the ####'s. > > Thank you. > > > ############################################################## > def compute_wind_chill_temperture(T:'Temperature, dF',s:'Wind speed, > mph')->'dF': > ''' > <http://www.erh.noaa.gov/er/iln/tables.htm#heat index> > ''' > return 35.74 + 0.6215*T + s**0.16*(T*0.4275-35.75) if T < 40 else T
If the expression is too long for your liking then just don't use the an if expression: if T < 40: return whatever else: return T is probably easier to read. -- http://mail.python.org/mailman/listinfo/python-list