This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients benjamin.peterson, georg.brandl, gvanrossum, jmillikin, pitrou, rhettinger
Date 2011-01-06.07:52:07
SpamBayes Score 0.00616585
Marked as misclassified No
Message-id <1294300330.52.0.543209371085.issue5945@psf.upfronthosting.co.za>
In-reply-to
Content
Actually, making PyMapping_Check() more robust produces a test failure in test_builtin, because of the following code:

        # Verify locals stores (used by list comps)
        eval('[locals() for i in (2,3)]', g, d)
        eval('[locals() for i in (2,3)]', g, collections.UserDict())

        class SpreadSheet:
            "Sample application showing nested, calculated lookups."
            _cells = {}
            def __setitem__(self, key, formula):
                self._cells[key] = formula
            def __getitem__(self, key):
                return eval(self._cells[key], globals(), self)

        ss = SpreadSheet()
        ss['a1'] = '5'
        ss['a2'] = 'a1*6'
        ss['a3'] = 'a2*7'
        self.assertEqual(ss['a3'], 210)


Should I fix the example to include a keys() method?
History
Date User Action Args
2011-01-06 07:52:10pitrousetrecipients: + pitrou, gvanrossum, georg.brandl, rhettinger, benjamin.peterson, jmillikin
2011-01-06 07:52:10pitrousetmessageid: <1294300330.52.0.543209371085.issue5945@psf.upfronthosting.co.za>
2011-01-06 07:52:07pitroulinkissue5945 messages
2011-01-06 07:52:07pitroucreate