Message5826

Author zyasoft
Recipients akong, njoyce, thijs, zyasoft
Date 2010-06-18.18:18:50
SpamBayes Score 0.00011496505
Marked as misclassified No
Message-id <1276885132.93.0.00123981763661.issue1618@psf.upfronthosting.co.za>
In-reply-to
Content
PyStringMap should duck type the same as PyDictionary for user Python code. The name remains from an unfortunate optimization from pre Jython 2.5, which these obsolete docs from 2.1 refer to.

When we switched to a java.util.ConcurrentHashMap as the backing store, we relaxed its semantics so PyObjects (if hashable) could be used as keys. However, we also retained the earlier interface that supports Java strings as keys.

CPython 2.5 specifies that globals must be a dict, however, it does not apparently enforce this requirement. Neither does Jython. In any event, it should be straightforward to change the default globals such that it uses PyDictionary instead, since it's perfectly reasonable for a user to pass their own dict - or in fact dict like object! - instead for the globals map.

I have changed the bug title accordingly.
History
Date User Action Args
2010-06-18 18:18:52zyasoftsetmessageid: <1276885132.93.0.00123981763661.issue1618@psf.upfronthosting.co.za>
2010-06-18 18:18:52zyasoftsetrecipients: + zyasoft, akong, thijs, njoyce
2010-06-18 18:18:52zyasoftlinkissue1618 messages
2010-06-18 18:18:50zyasoftcreate