What would be the naming conventions in Python for functions that can return a modified object or that just modifies the instance.
Let's assume you want to implement both, how you should name the functions?
Example: Let's assume that you want a crop()
function for an Image object. I Ruby it was simple because you should use crop()
if you return a copy and crop!()
if you modify the original instance.
?
, there is a common convention for predicates--useis
at the beginning of the function name. – Erse