Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #105566
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: |
| Date | 2016-03-23 11:26 -0700 |
| Message-ID | <mailman.65.1458757580.2244.python-list@python.org> (permalink) |
| References | <CAFWQgO=o-rPavakLZZBRxAthM5g7xE=Mn4hwcFPxTUvCEXn7SQ@mail.gmail.com> |
On 03/22/2016 08:17 PM, Nick Eubank wrote: > Relatedly, if this is a desired behavior, any advice one how best to work > with dictionaries when one wants "True" and 1 to be different? I'm working > on a function that accepts arguments that may be "True" or 1 (meaning very > different things) and am seeking a pythonic solution... If your keys are only numeric and True/False, you can check for and mutate True/False into strings "True"/"False" -- ~Ethan~
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Ethan Furman <ethan@stoneleaf.us> - 2016-03-23 11:26 -0700
csiph-web