/usr/lib/python3/dist-packages/zope/interface
NameSizeModeActions
common/-0755rm
tests/-0755rm
__pycache__/-0755rm
adapter.py364980644editdlrm
advice.py76120644editdlrm
declarations.py476650644editdlrm
document.py40520644editdlrm
exceptions.py86430644editdlrm
interface.py400590644editdlrm
interfaces.py535590644editdlrm
registry.py260230644editdlrm
ro.py242260644editdlrm
verify.py84200644editdlrm
_compat.py51910644editdlrm
_flatten.py10560644editdlrm
_zope_interface_coptimizations.cpython-310-x86_64-linux-gnu.so440080644editdlrm
__init__.py36230644editdlrm
Edit: /usr/lib/python3/dist-packages/zope/interface/_flatten.py (1056B)
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Adapter-style interface registry See Adapter class. """ from zope.interface import Declaration def _flatten(implements, include_None=0): try: r = implements.flattened() except AttributeError: if implements is None: r=() else: r = Declaration(implements).flattened() if not include_None: return r r = list(r) r.append(None) return r