Issue2644

classification
Title: Representation of Java maps with String keys differs from Python
Type: behaviour Severity: minor
Components: Core Versions:
Milestone:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: jamesmudd
Priority: Keywords:

Created on 2017-11-22.18:51:09 by jamesmudd, last changed 2017-11-22.18:51:09 by jamesmudd.

Messages
msg11673 (view) Author: James Mudd (jamesmudd) Date: 2017-11-22.18:51:08
When you print a Java map to the console the representation of strings looses the quotes e.g:
    >>> str = 'hello world'
    >>> str
    'hello world'  <<<<<<<<<<<<<<<< Has quotes
    >>> from java.lang import String
    >>> jstr = String('hello world')
    >>> jstr
    hello world  <<<<<<<<<<<<<<<<<< Missing quotes?

    >>> from java.util import HashMap
    >>> hm = HashMap({'a': 1, 'b': 2, 'c': 3})
    >>> hm
    {a: 1, b: 2, c: 3}  <<<<<<<<<<<<<<<<<< Missing quotes?
    >>> m = {'a': 1, 'b': 2, 'c': 3}
    >>> m
    {'a': 1, 'b': 2, 'c': 3}  <<<<<<<<<<<<<<<< Has quotes

I noticed this playing with maps but is this intended?
History
Date User Action Args
2017-11-22 18:51:09jamesmuddcreate