[issue39079] help() modifies the string module

2019-12-17 Thread Alfred Morgan
New submission from Alfred Morgan : import string a = string.letters help(int) b = string.letters a == b # False -- components: Library (Lib) messages: 358564 nosy: Zectbumo priority: normal severity: normal status: open title: help() modifies the string module versions: Python 2.7

[issue14573] json iterencode can not handle general iterators

2018-04-14 Thread Alfred Morgan
Alfred Morgan added the comment: @serhiy.storchaka while you are doing your overhaul will you please add support for raw json values. I often find myself where I have a serialized object that I want to include in an object response that I'm about to serialize anyway. The implement

[issue14573] json iterencode can not handle general iterators

2018-04-13 Thread Alfred Morgan
Alfred Morgan added the comment: I would love to but it is a bit late for me now. The json encoding has been optimized in c which falls outside my expertise. https://github.com/python/cpython/blob/master/Modules/_json.c -- ___ Python tracker

[issue14573] json iterencode can not handle general iterators

2014-10-01 Thread Alfred Morgan
Alfred Morgan added the comment: Need a patch? Here you go. https://github.com/Zectbumo/cpython/compare/master How to use it: encoder = JSONEncoder(stream=True) This will iterencode() iterators as lists and file objects as strings and stream them when constructed with stream=True