Message9027

Author zyasoft
Recipients amak, fwierzbicki, kzuberi, leouserz, pedronis, zyasoft
Date 2014-09-24.18:26:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1411583206.33.0.808190439197.issue1152612@psf.upfronthosting.co.za>
In-reply-to
Content
In particular, we should employ the same strategy we did with #1631 and use much more robust testing from test_dict. (I don't think CPython did this for __dict__ specifically because they are the same underlying implementation, unlike our almost the same now, but not quite PyStringMap vs PyDictionary.)


$ python
Python 2.7.5 (default, Mar  9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class Foo(object): pass
...
>>> Foo.__dict__.viewvalues()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'dictproxy' object has no attribute 'viewvalues'
>>> Foo().__dict__.viewvalues()
dict_values([])
>>> ^D
$ jython27
Jython 2.7b3+ (default:0fdc65448925, Sep 24 2014, 10:30:07)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_21
Type "help", "copyright", "credits" or "license" for more information.
>>> class Foo(object): pass
...
>>> Foo().__dict__.viewvalues()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'stringmap' object has no attribute 'viewvalues'
History
Date User Action Args
2014-09-24 18:26:46zyasoftsetmessageid: <1411583206.33.0.808190439197.issue1152612@psf.upfronthosting.co.za>
2014-09-24 18:26:46zyasoftsetrecipients: + zyasoft, pedronis, leouserz, fwierzbicki, kzuberi, amak
2014-09-24 18:26:46zyasoftlinkissue1152612 messages
2014-09-24 18:26:45zyasoftcreate