对于python模块的内容结构是否有一个PEP或具有普遍约束力的约定? 我现在的结构是
如下所示(此处没有模块方法):
"""
Generic clients
This package contains abstract, generic clients for foreign-API interaction.
Please see the client's documentation for advises for implementation.
"""
__date__ = "16.07.2014"
__author__ = "My Name <me@company.com>"
__all__ = ['ImportClient',
'ExportClient',
'IEClient',
'CRUDClient']
from .abc import CustomerAwareConfigurableSlaveLog
from ..config import Config
import pyopenimmo as OpenImmo
from abc import abstractmethod
class ImportClient(CustomerAwareConfigurableSlaveLog):
"""
Generic client that can import OpenImmo data
"""
@abstractmethod
def import_(self, openimmo):
"""
Imports OpenImmo data from API
"""
pass
class ExportClient(CustomerAwareConfigurableSlaveLog):
"""
Generic client that can export OpenImmo data
"""
@abstractmethod
def export(self, openimmo): #@UnusedVariable
"""
Exports OpenImmo data to API
"""
return
<snip>
这对我来说似乎很可行,但我也希望其他人发现我的代码易于理解。你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐