Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #107542
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Ethan Furman <ethan@stoneleaf.us> |
| Newsgroups | comp.lang.python |
| Subject | Re: How much sanity checking is required for function inputs? |
| Date | Sun, 24 Apr 2016 00:22:58 -0700 |
| Lines | 17 |
| Message-ID | <mailman.32.1461482509.32212.python-list@python.org> (permalink) |
| References | <5713E52D.3060407@icloud.com> <1461131475.4042173.584042297.03DAB00E@webmail.messagingengine.com> <57171D23.40709@stoneleaf.us> <1461133057.4046578.584060569.2DD34821@webmail.messagingengine.com> <57185E88.30201@yahoo.com> <57197FC3.4030701@icloud.com> <1461291613.433097.586174185.01BB7E37@webmail.messagingengine.com> <57199BA5.4000703@icloud.com> <5719ACBB.8020905@stoneleaf.us> <571C1AA8.8000202@icloud.com> <CAGgTfkPJrbw85XG2gC=miCi8UJWM4KU5snskGSwvZdkXs8BG5w@mail.gmail.com> <571C7452.5060501@stoneleaf.us> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de rRcwuTh4l0Gv344y4dPQYQ3kJcETLTkoCeHXF0uCGFYg== |
| Return-Path | <ethan@stoneleaf.us> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'subject:How': 0.09; 'constants.': 0.09; 'enum': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'ide': 0.09; 'message- id:@stoneleaf.us': 0.09; 'suggestions.': 0.09; 'python': 0.10; '2016': 0.16; '23,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'recently.': 0.16; 'subject:required': 0.16; 'wrote:': 0.16; 'version.': 0.18; 'for?': 0.23; 'sat,': 0.23; "haven't": 0.24; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'mostly': 0.27; 'str': 0.29; '~ethan~': 0.29; "i'd": 0.31; 'certain': 0.31; 'url:python': 0.33; 'michael': 0.33; 'int': 0.33; 'charged': 0.35; 'replace': 0.35; 'but': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'to:addr:python.org': 0.40; 'your': 0.60; 'avoid': 0.61; 'charset:windows-1252': 0.62; 'hmm...': 0.84; 'subject:much': 0.91; 'mistakes': 0.95 |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
| In-Reply-To | <CAGgTfkPJrbw85XG2gC=miCi8UJWM4KU5snskGSwvZdkXs8BG5w@mail.gmail.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.22 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <571C7452.5060501@stoneleaf.us> |
| X-Mailman-Original-References | <5713E52D.3060407@icloud.com> <1461131475.4042173.584042297.03DAB00E@webmail.messagingengine.com> <57171D23.40709@stoneleaf.us> <1461133057.4046578.584060569.2DD34821@webmail.messagingengine.com> <57185E88.30201@yahoo.com> <57197FC3.4030701@icloud.com> <1461291613.433097.586174185.01BB7E37@webmail.messagingengine.com> <57199BA5.4000703@icloud.com> <5719ACBB.8020905@stoneleaf.us> <571C1AA8.8000202@icloud.com> <CAGgTfkPJrbw85XG2gC=miCi8UJWM4KU5snskGSwvZdkXs8BG5w@mail.gmail.com> |
| Xref | csiph.com comp.lang.python:107542 |
Show key headers only | 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
Re: How much sanity checking is required for function inputs? Ethan Furman <ethan@stoneleaf.us> - 2016-04-24 00:22 -0700
csiph-web