Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #107542

Re: How much sanity checking is required for function inputs?

From Ethan Furman <ethan@stoneleaf.us>
Newsgroups comp.lang.python
Subject Re: How much sanity checking is required for function inputs?
Date 2016-04-24 00:22 -0700
Message-ID <mailman.32.1461482509.32212.python-list@python.org> (permalink)
References (7 earlier) <57199BA5.4000703@icloud.com> <5719ACBB.8020905@stoneleaf.us> <571C1AA8.8000202@icloud.com> <CAGgTfkPJrbw85XG2gC=miCi8UJWM4KU5snskGSwvZdkXs8BG5w@mail.gmail.com> <571C7452.5060501@stoneleaf.us>

Show all headers | View raw


On 04/23/2016 06:21 PM, Michael Selik wrote:
> On Sat, Apr 23, 2016 at 9:01 PM Christopher Reimer wrote:

>> Hmm... What do we use Enum for? :)
>
> You can use Enum in certain circumstances to replace int or str constants.
> It can help avoid mistyping mistakes and might help your IDE give
> auto-complete suggestions. I haven't found a good use for them myself, but
> I'd been mostly stuck in Python 2 until recently.

enum34 is the backport, aenum is the turbo charged version.

   https://pypi.python.org/pypi/enum34
   https://pypi.python.org/pypi/aenum

--
~Ethan~

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: How much sanity checking is required for function inputs? Ethan Furman <ethan@stoneleaf.us> - 2016-04-24 00:22 -0700

csiph-web