Stupid question, just need a quick and dirty fix
Paul Rubin
no.email at nospam.invalid
Fri Jul 22 02:03:04 EDT 2016
Jordan Bayless <jmbayless at 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.
More information about the Python-list
mailing list