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 cool-RR
Recipients cool-RR
Date 2014-05-20.15:32:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1400599961.44.0.600133216015.issue21542@psf.upfronthosting.co.za>
In-reply-to
Content
pprint doesn't work well for counters, sometimes shows them like a dict 
    
    Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> dd={'a': 11640, 'b': 2614, 'c': 5261, 'd': 5311, 'e': 17722, 'f': 3041, 'g': 3570, 'h': 6740, 'i':
     10729, 'j': 279, 'k': 1812, 'l': 6391, 'm': 5037, 'n': 10111, 'o': 11922, 'p': 3863, 'q': 99, 'r': 94
    61, 's': 9444, 't': 13744, 'u': 4027, 'v': 1486, 'w': 3194, 'x': 540, 'y': 2976, 'z': 203}
    >>> import collections
    >>> collections.Counter(dd)
    Counter({'e': 17722, 't': 13744, 'o': 11922, 'a': 11640, 'i': 10729, 'n': 10111, 'r': 9461, 's': 9444,
     'h': 6740, 'l': 6391, 'd': 5311, 'c': 5261, 'm': 5037, 'u': 4027, 'p': 3863, 'g': 3570, 'w': 3194, 'f
    ': 3041, 'y': 2976, 'b': 2614, 'k': 1812, 'v': 1486, 'x': 540, 'j': 279, 'z': 203, 'q': 99})
    >>> import pprint
    >>> pprint.pprint(collections.Counter(dd))
    {'a': 11640,
     'b': 2614,
     'c': 5261,
     'd': 5311,
     'e': 17722,
     'f': 3041,
     'g': 3570,
     'h': 6740,
     'i': 10729,
     'j': 279,
     'k': 1812,
     'l': 6391,
     'm': 5037,
     'n': 10111,
     'o': 11922,
     'p': 3863,
     'q': 99,
     'r': 9461,
     's': 9444,
     't': 13744,
     'u': 4027,
     'v': 1486,
     'w': 3194,
     'x': 540,
     'y': 2976,
     'z': 203}
    >>>
History
Date User Action Args
2014-05-20 15:32:41cool-RRsetrecipients: + cool-RR
2014-05-20 15:32:41cool-RRsetmessageid: <1400599961.44.0.600133216015.issue21542@psf.upfronthosting.co.za>
2014-05-20 15:32:41cool-RRlinkissue21542 messages
2014-05-20 15:32:40cool-RRcreate