Convert from numbers to letters

Steven Bethard steven.bethard at gmail.com
Fri May 20 11:34:17 EDT 2005


Jason Drew wrote:
> ##def tuple2coord(tupl):
[snip]
> ##    rowfromzero, colfromzero = tupl

Just a side note here that if you want a better function signature, you 
might consider writing this as:

tuple2coord((rowfromzero, colfromzero)):
     ...

Note that the docstrings are nicer this way:

py> def tuple2coord(tupl):
...     x, y = tupl
...
py> help(tuple2coord)
Help on function tuple2coord in module __main__:

tuple2coord(tupl)

py> def tuple2coord((x, y)):
...     pass
...
py> help(tuple2coord)
Help on function tuple2coord in module __main__:

tuple2coord((x, y))

STeVe



More information about the Python-list mailing list