ListProperty vs StringListProperty on Google App Engine

I want to store lists of integers (user identifiers), should I create their strings and use StringListProperty or just use ListProperty, I am wondering what is more optimized, the specific StringListProperty of a heterogeneous ListProperty (when used only with integers).

I will need to add users to the list until it reaches a certain number, and then create an instance of the group for these users (in a separate Entity Group).

+3
source share
1 answer

StringListProperty is a very thin ListProperty wrapper. there is no significant difference other than the type of element.

:

class StringListProperty(ListProperty):
  def __init__(self, verbose_name=None, default=None, **kwds):
    super(StringListProperty, self).__init__(basestring,
                                             verbose_name=verbose_name,
                                             default=default,
                                             **kwds)

ListProperty, , , , , .

+10

Source: https://habr.com/ru/post/1787770/


All Articles