What is maximum value of int or long in Google App Engine datastore?

本秂侑毒 提交于 2019-12-11 14:23:26

问题


What is maximum value for IntegerProperty, LongProperty in Google App Engine Python?


回答1:


IntegerProperty is an int or a long:

int or long An integer value, up to 64 bits.

Python int values are converted to Python long values prior to storage. A value stored as an int will be returned as a long.

If a long larger than 64 bits is assigned, only the least significant 64 bits are stored.

And for added clarity, you can use sys.maxint to find the actual value (run this in a shell and "import sys" first)




回答2:


There is no LongProperty on Google App Engine, but only IntegerProperty and as already pointed it's a 64-bit signed integer.

This number has a minimum −9,223,372,036,854,775,808 and maximum 9,223,372,036,854,775,807.



来源:https://stackoverflow.com/questions/20169228/what-is-maximum-value-of-int-or-long-in-google-app-engine-datastore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!