The facility uses the Python function eval
<https://docs.python.org/3/library/functions.html#eval>. A dictionary with
key 'math' and value the math module is passed in for *globals*. The record
is passed in for *locals*. So, you could use the expression

*outTemp = 44 if outTemp in locals() else None*




On Fri, Mar 8, 2024 at 3:33 PM Graham Eddy <[email protected]> wrote:

> oops, python syntax would be: expr if ops_tye in globals() else None
> *⊣GE⊢*
>
> On 9 Mar 2024, at 10:31 am, Graham Eddy <[email protected]> wrote:
>
> i think ' if obs_type in globals() then expr else None ' would work
> *⊣GE⊢*
>
> On 9 Mar 2024, at 9:13 am, '[email protected]' via weewx-user <
> [email protected]> wrote:
>
> I think I remember that this has been asked before, how to check with an
> expression in Corrections, if an obs_type is present?
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/ae1bbcf8-23b1-475e-8749-62286df24fb0n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/ae1bbcf8-23b1-475e-8749-62286df24fb0n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/0507D046-7EED-4A96-8F28-038B70BECEC7%40geddy.au
> <https://groups.google.com/d/msgid/weewx-user/0507D046-7EED-4A96-8F28-038B70BECEC7%40geddy.au?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEAuuP-SCAMux5dsvxKPUDxP0b_W7gwH0zzf44xWcQb5uw%40mail.gmail.com.

Reply via email to