common practice for creating utility functions?
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Mon May 15 19:46:05 EDT 2006
Paul Rubin a écrit :
> John Salerno <johnjsal at NOSPAMgmail.com> writes:
>
>>So my first question is this: should I make a Cryptogram class for
>>this, or are functions fine? If the latter, then back to my original
>>point: can I do something like this:
>>
>>def convert_quote(quote):
>> return make_code(quote)
>
>
> It's fine to do that if it expresses your intentions more clearly.
Then it would be better to just alias it:
# def convert_quote(quote):
# return make_code(quote)
convert_quote = make_code
About the "fine to do" part, remember that Python's function calls are
rather expansive...
More information about the Python-list
mailing list