[gnulib-tool-py] Separate classes into different packages
From:
Dmitriy Selyutin
Subject:
[gnulib-tool-py] Separate classes into different packages
Date:
Sun, 24 Jun 2012 00:24:59 +0400
Hello everyone.
I've recently noticed that it becomes hard to find code which needs editing. What do you think if I'll separate each class into standalone script? Here is the proposed hierarchy:
================================================================================ # GNULibMode.py ================================================================================ from .constants import [necessary variables]
class GNULibMode(object): # Here is a body of GNULibMode with all methods
================================================================================ # GNULibMode.py ================================================================================
from .constants import [necessary variables] from .GNULibMode import GNULibMode
class GNULibModule(GNULibMode): # Here is a body of GNULibModule with all methods
================================================================================
# GNULibImport.py ================================================================================ from .constants import [necessary variables] from .GNULibMode import GNULibMode from .GNULibModule import GNULibModule
class GNULibImport(GNULibMode): # Here is a body of GNULibImport with all methods
================================================================================ # classes.py ================================================================================
from .constants import [necessary variables] from .GNULibMode import GNULibMode from .GNULibModule import GNULibModule from .GNULibTestDir import GNULibTestDir [ET CETERA]
The one negative (or positive?) effect is that user either can use
from pygnulib.classes import GNULibMode or from pygnulib.GNULibMode import GNULibMode directive, but I think it is not a problem.
The another reason why we could follow this way is that we can improve the
portability of the pygnulib. What do you think? I would be very glad if we could split the source code of the each class into standalone script, it could certainly help to make things quicker.