nik added the comment:
I can confirm that the patch fix this issue. I adapted the patch (variable
names changed):
5523a5524
> Py_INCREF(&Struct_Type);
5529a5531
> Py_INCREF(&Union_Type);
5535a5538
> Py_INCREF(&Pointer_Type);
5541a5545
>
New submission from Nik Tautenhahn :
Hi,
before 2.7, an
import json
json.loads('"abc"')
yielded u"abc".
in 2.7 I get
"abc" (a byte string).
I would have expected an entry in "news" or "What's new in 2.7" why this change
happ
Nik Tautenhahn added the comment:
Well, Ok, if I take bob's comment from the simplejson Issue, I can understand
that some people want byte strings. But then I would like to have something
like a "parse_str" hook, to enhance my json-Decoder or maybe a keyword argument
for t
Nik Tautenhahn added the comment:
Well, then at least the documentation and the "What's changed" need to be
updated. Furthermore, if such decisions are made, it would be at least nice to
have some general "decode-hook" for json.JSONDecoder - the "object_hook&q
Nik Tautenhahn added the comment:
Yep, the solution should not be "maybe it's str, maybe it's unicode" - I mean,
if the decoder gives you a str if there are no fancy characters and unicode if
it contains some, this might lead to some confusion... And yes, in my opinion,
Nik Tautenhahn added the comment:
There is even more inconsistency here.
As already mentioned, we have this:
>>> import json
>>> json.loads(json.dumps("abc"))
'abc'
If, however, I am evil and hide _json.so (which is the C-part of the json
module for
New submission from Nik Galitsky :
Python 3.2 on linux (RHEL 5.3) x86_64 build from source code.
Configure options:
./configure --prefix=/scratch/Python-3.2 --enable-big-digits=30
--with-universal-archs=all --with-fpectl --enable-shared
Built with GCC 4.3.3 with major options
-g3 -O3 -m64
Nik Galitsky added the comment:
Thank you all for your responses. While getting the meaningful error message in
this case is very important, the main thing for us is to somehow fix this
problem to allow larger objects serialization which is not at all uncommon on a
64-bit machines with large
Change by Nik Vaessen :
--
nosy: nikvaes
priority: normal
severity: normal
status: open
title: random module does not have type hints
type: enhancement
___
Python tracker
<https://bugs.python.org/issue40
Change by Nik Vaessen :
--
keywords: +patch
pull_requests: +18834
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19480
___
Python tracker
<https://bugs.python.org/issu
10 matches
Mail list logo