-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Minor Change
Line: https://github.com/mongodb/mongo-python-driver/blob/master/pymongo/collection.py#L132
getattr returns always something, even for special methods, and this can create confusion when interfacing with other libraries or creating custom code. For example callable(collection) would return True (and calling triggers an error). Also see this problem:
https://github.com/ipython/ipython/issues/5227
Probably getattr should not retrurn for things like properties starting and ending with underscore.
- duplicates
-
PYTHON-480 Sub-collection issue when using ABCMeta
- Closed