Message5826
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. |
|
Date |
User |
Action |
Args |
2010-06-18 18:18:52 | zyasoft | set | messageid: <1276885132.93.0.00123981763661.issue1618@psf.upfronthosting.co.za> |
2010-06-18 18:18:52 | zyasoft | set | recipients:
+ zyasoft, akong, thijs, njoyce |
2010-06-18 18:18:52 | zyasoft | link | issue1618 messages |
2010-06-18 18:18:50 | zyasoft | create | |
|