Package schrodinger :: Package infra :: Module mmkv :: Class MMKVArgList
[hide private]
[frames] | no frames]

Class MMKVArgList

object --+
         |
        MMKVArgList
Known Subclasses:

A class to provide list-like access to MMKV/MMIM array properties.

Like an actual Python list, indices start at 0, not 1. Unlike a Python list, at this time negative indices and slices are not supported.

Note that while this class requires an MMKV/MMIM handle, it neither initiates nor terminates the mmkv library.

Instance Methods [hide private]
 
__init__(self, handle, key, converter, getter, setter, get_len, set_len)
Create an instance from the MMKV/MMIM handle and key (int or string).
 
__getitem__(self, index)
 
__setitem__(self, index, value)
 
__len__(self)
 
setSize(self, size)
Set the size of the MMKV argument list.
 
append(self, value)
Append a new value to the current MMKV arglist.
 
__iter__(self)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, handle, key, converter, getter, setter, get_len, set_len)
(Constructor)

 

Create an instance from the MMKV/MMIM handle and key (int or string).

Takes functions to get and set indexed values, and a function to determine the length. If these are not provided, they are looked up based on the key provided.

get_len and set_len methods should be defined for array types only.

Overrides: object.__init__

append(self, value)

 

Append a new value to the current MMKV arglist.

Parameters:
  • value (str, int, bool, or float depending on the MMKV arglist type) - The new value to append.