Symbols as parameters?

Ben Finney ben+python at benfinney.id.au
Thu Jan 21 04:10:34 EST 2010


Martin Drautzburg <Martin.Drautzburg at web.de> writes:

> When passing parameters to a function, you sometimes need a paramter
> which can only assume certain values

You might like to try the ‘enum’ library for this
<URL:http://pypi.python.org/pypi/enum>.

-- 
 \       “You could augment an earwig to the point where it understood |
  `\     nuclear physics, but it would still be a very stupid thing to |
_o__)                              do!” —The Doctor, _The Two Doctors_ |
Ben Finney



More information about the Python-list mailing list