Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #111739
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Stupid question, just need a quick and dirty fix |
| Date | 2016-07-21 23:03 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <87y44ub46f.fsf@jester.gateway.pace.com> (permalink) |
| References | (2 earlier) <mailman.39.1469161719.22221.python-list@python.org> <881b184c-11e4-41e7-a01e-6a21d454ce68@googlegroups.com> <CAPTjJmrqnbobzhzGuiLtdUVgTAnP4togkDqOW3M7pgdnECJFug@mail.gmail.com> <mailman.40.1469162766.22221.python-list@python.org> <2795f3e5-e660-40c6-8a43-97a9613d7577@googlegroups.com> |
Jordan Bayless <jmbayless@gmail.com> writes: > desired = Id < 10 or Id > 133 or Id in good_ids > When I try to validate whether I passed that check, I'm told there's a > Name error and it's not defined (using the last line of the snippet > above). Id was called IDNum in your earlier pst > Also, I guess I'm at a loss for what I'm supposed to do with "desired" > to check it prior to running my email code. > > if desired == True: doesn't work That should work, but it's more concise and idiomatic to say "if desired: ..." > I'm headed to bed. Too tired to focus on making this work and I > apparently really don't 'get' what I'm doing. Maybe I'll be better off > with fresh eyes on it tomorrow. You're probably better off reading a basic Python tutorial than trying to mess with a working piece of code by trial and error without knowing the language. https://docs.python.org/2/tutorial/index.html is a good place to get started.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Stupid question, just need a quick and dirty fix Jordan Bayless <jmbayless@gmail.com> - 2016-07-21 21:19 -0700
Re: Stupid question, just need a quick and dirty fix Chris Angelico <rosuav@gmail.com> - 2016-07-22 14:28 +1000
Re: Stupid question, just need a quick and dirty fix Jordan Bayless <jmbayless@gmail.com> - 2016-07-21 21:39 -0700
Re: Stupid question, just need a quick and dirty fix Chris Angelico <rosuav@gmail.com> - 2016-07-22 14:45 +1000
Re: Stupid question, just need a quick and dirty fix Jordan Bayless <jmbayless@gmail.com> - 2016-07-21 22:26 -0700
Re: Stupid question, just need a quick and dirty fix Paul Rubin <no.email@nospam.invalid> - 2016-07-21 23:03 -0700
Re: Stupid question, just need a quick and dirty fix Chris Angelico <rosuav@gmail.com> - 2016-07-22 16:34 +1000
Re: Stupid question, just need a quick and dirty fix Steven D'Aprano <steve@pearwood.info> - 2016-07-22 16:37 +1000
Re: Stupid question, just need a quick and dirty fix thilfigr16@gmail.com - 2016-07-22 06:00 -0700
Re: Stupid question, just need a quick and dirty fix Cousin Stanley <cousinstanley@gmail.com> - 2016-07-22 08:45 -0700
Re: Stupid question, just need a quick and dirty fix Michael Selik <michael.selik@gmail.com> - 2016-07-22 01:18 -0400
Re: Stupid question, just need a quick and dirty fix Steven D'Aprano <steve@pearwood.info> - 2016-07-22 16:08 +1000
Re: Stupid question, just need a quick and dirty fix Michael Selik <michael.selik@gmail.com> - 2016-07-22 18:53 +0000
Re: Stupid question, just need a quick and dirty fix MRAB <python@mrabarnett.plus.com> - 2016-07-22 15:58 +0100
csiph-web