Why is sys.float_repr_style configured as "legacy"

43 views
Skip to first unread message

limin xiao

unread,
Aug 16, 2018, 10:46:33 AM8/16/18
to Google App Engine
I just found sys.float_repr_style is configured as "legacy" in Python 2.7 runtime of GAE.
Which may be a surprise for most users.

The full discussion can be found here.

Is there any strong motivation to set "legacy" other than "short"?

For me I have at lease 3 reasons to sit with "short"
1. To keep consistent with other platforms. (Python 2.7 default is "short")
2. To keep consistent with SDK
3. To get shorter string when dumps to json.

Actually the 3rd one makes most sense for me.

Katayoon (Cloud Platform Support)

unread,
Aug 16, 2018, 6:16:14 PM8/16/18
to Google App Engine

Hi Limin,


I reproduced the issue and as you mentioned, I see different behaviors when I run it in Cloud Shell and when I deploy the app in App Engine. It seems like a bug. So, I created a report in the Issue Tracker so that the issue be investigated by the Cloud App Engine team. You may star the report for all further updates.

limin xiao

unread,
Aug 17, 2018, 9:01:25 AM8/17/18
to Google App Engine
Thank you for prompt response. Waiting for good news.

rah...@google.com

unread,
Sep 16, 2018, 10:17:08 AM9/16/18
to Google App Engine
This should be fixed. 
Reply all
Reply to author
Forward
0 new messages