common practice for creating utility functions?

Bruno Desthuilliers bdesth.quelquechose at
Tue May 16 01:46:05 CEST 2006

Paul Rubin a écrit :
> John Salerno <johnjsal at> 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