module flaskJSONRPCServer.virtVar

Description

#       #кешируем системные атрибуты, а также обеспечиваем к ним быстрый доступ без дополнительных проверок
#       _cache={}
#       for k in ['_inited', '_getattr_blacklist', '_cb']:
#          try: s=object.__getattribute__(self, k)
#          except AttributeError: s=None
#          if key==k: return s
#          else: _cache[k]=s
#       #full checking
#       if not(_cache['_inited']) or (key in _cache['_blacklist']):
#          #обьект еще не инициирован до конца, или атрибут занесен в черный лист
#          return object.__getattribute__(self, key)
#       elif _cache['_cb'].get:
#          #указан коллбек для обращения к атрибутам
#          return _cache['_cb'].get(self, key)
#       else:
#          #! нет коллбека, что делать в данной ситуации?
#          print '!! getattribute', key

class virtVar(self, obj, saveObj=True, cbGet=None, cbSet=None, cbDel=None)

Description
Обертка над стандартными типами данных.
Обертка отслеживает обращение к себе, и позволяет навесить колбек на него. Внутри колбека можно менять поведение обращения к переменной. За счет этого возможно реализовать меж-процессный или меж-серверный доступ к данным.
Return
instance Instance of class virtVar

method_special __add__(self, other)

Description
#==numeric methods

method_special __and__(self, other)

method_special __contains__(self, item)

method_special __delitem__(self, key)

method_special __div__(self, other)

method_special __divmod__(self, other)

method_special __eq__(self, other)

method_special __floordiv__(self, other)

method_special __ge__(self, other)

method_special __getitem__(self, key)

method_special __gt__(self, other)

method_special __hash__(self)

method_special __iadd__(self, other)

Description
#==numeric in-place methods

method_special __iand__(self, other)

method_special __idiv__(self, other)

method_special __ifloordiv__(self, other)

method_special __ilshift__(self, other)

method_special __imod__(self, other)

method_special __imul__(self, other)

method_special __init__(self, obj, saveObj=True, cbGet=None, cbSet=None, cbDel=None)

method_special __instancecheck__(self, other)

method_special __ior__(self, other)

method_special __ipow__(self, other, modulo=None)

method_special __irshift__(self, other)

method_special __isub__(self, other)

method_special __iter__(self)

method_special __itruediv__(self, other)

method_special __ixor__(self, other)

method_special __le__(self, other)

method_special __len__(self)

method_special __lshift__(self, other)

method_special __lt__(self, other)

Description
#== eq methods
#! нужна проверка типа на случай, если идет сравнение с другим virtVar

method_special __missing__(self, key)

method_special __mod__(self, other)

method_special __mul__(self, other)

method_special __ne__(self, other)

method_special __nonzero__(self)

method_special __or__(self, other)

method_special __pow__(self, other, modulo=None)

method_special __repr__(self)

method_special __reversed__(self)

method_special __rshift__(self, other)

method_special __setitem__(self, key, val)

method_special __str__(self)

method_special __sub__(self, other)

method_special __subclasscheck__(self, other)

method_special __truediv__(self, other)

method_special __xor__(self, other)

method_special __getValue(self, key=None)

method_special __setValue(self, key, val)

function_private _id(s)