On 16/04/2015 23:40, Alan Gauld wrote:
On 16/04/15 22:03, Alan Gauld wrote:
def percent2Gy(dose_percent, target_dose_cGy):
"""
Convert a dose given as a percent of target dose into Gy (Gray).
"""
dose_Gy = cGy2Gy((dose_percent / 100.0) * target_dose_cGy)
return dose_Gy
Note in this case you could just create an alias
percent2GY = cGy2Gy
Except that the name would then be misleading - my bad!
The value that your function adds is the percentage calculation.
But if it is a straight renaming exercise then an alias would
be more appropriate than defining a new wrapper function.
Sorry, for the bad example.
Bah, that'll teach me to read more closely in the future :(
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor