Skip to content

Commit

Permalink
Debug prints in __init__ for BaseList
Browse files Browse the repository at this point in the history
  • Loading branch information
Furr committed Jul 13, 2018
1 parent 61aeeab commit 1811bf5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mongoengine/base/datastructures.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,14 @@ class BaseList(list):
_name = None

def __init__(self, list_items, instance, name):
print("BaseList.__init__")
Document = _import_class('Document')
EmbeddedDocument = _import_class('EmbeddedDocument')

if isinstance(instance, (Document, EmbeddedDocument)):
self._instance = weakref.proxy(instance)
self._name = name
print("BaseList.__init__ _instance(%s)" % this._instance)
super(BaseList, self).__init__(list_items)

def __getitem__(self, key, *args, **kwargs):
Expand Down Expand Up @@ -216,7 +218,6 @@ def _mark_as_changed(self, key=None):

class EmbeddedDocumentList(BaseList):

@classmethod
def __match_all(cls, embedded_doc, kwargs):
"""Return True if a given embedded doc matches all the filter
kwargs. If it doesn't return False.
Expand Down

0 comments on commit 1811bf5

Please sign in to comment.