/usr/lib/python3/dist-packages/zope/interface
NameSizeModeActions
common/-0755rm
tests/-0755rm
__pycache__/-0755rm
adapter.py362180644editdlrm
advice.py38900644editdlrm
declarations.py430060644editdlrm
document.py40670644editdlrm
exceptions.py86350644editdlrm
interface.py388250644editdlrm
interfaces.py501250644editdlrm
registry.py258280644editdlrm
ro.py241550644editdlrm
verify.py71540644editdlrm
_compat.py43690644editdlrm
_flatten.py10560644editdlrm
_zope_interface_coptimizations.cpython-312-x86_64-linux-gnu.so440160644editdlrm
__init__.py34630644editdlrm
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