Skip to content
  • Damien George's avatar
    py: Raise NotImplementedError if locals() used when it's not supported. · cc150978
    Damien George authored
    In uPy locals() is supported in:
    - module-level function
    - class construction body
    
    locals() is not supported in other execution contexts, which are:
    - functions
    - lambads
    - generators
    - comprehensions
    
    This patch makes sure that locals() is not used in an unsupported context
    by raising a NotImplementedError in such cases.
    cc150978