Skip to content

"chameleon.utils.Scope": "dict" methods unreliable in presence of "global" variables #305

Closed

Description

@d-maurer

Working on the integration of zope.tales expressions with chameleon, I noticed that some expressions use Scope.vars.get. Like other dict methods, this method knows nothing about _root and therefore may miss (some) variables defined with Scope.set_global.

>>> from chameleon.utils import Scope
>>> t = Scope()
>>> l = t.copy()
>>> l.setGlobal("a", "A")
>>> l.get("a")
>>> 

Activity

  1. malthe commented on Mar 29, 2020

    @malthe
    Owner

    I'm not sure I'm completely understanding what needs to be done to fix this.

  2. d-maurer commented on Mar 29, 2020

    @d-maurer
    Author
  3. malthe commented on Apr 6, 2022

    @malthe
    Owner

    @d-maurer did you have a chance to look at the pull request that addresses this? ^^^

  4. d-maurer commented on Apr 6, 2022

    @d-maurer
    Author
  5. malthe commented on Dec 12, 2023

    @malthe
    Owner

    This should be fixed with #306.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions