Passing information between modules
dn
PythonList at DancesWithMice.info
Sun Nov 20 14:11:30 EST 2022
On 21/11/2022 01.03, Stefan Ram wrote:
> dn <PythonList at DancesWithMice.info> writes:
>> In some respects we have the (OP) problem because Python does not have
>> "interfaces" as a formal component of the language.
>
> What one can do today is,
>
> class my_interface( metaclass=abc.ABCMeta ):
> """This interface ..."""
>
> @abc.abstractmethod
> def method( __self__, *s, **x ):
> """This abstract method ..."""
>
> # ...
>
> my_interface.register( my_class )
>
> # ...
Ugh!
--
Regards,
=dn
More information about the Python-list
mailing list