parsedatetime
parsedatetime copied to clipboard
Separate `parsedatetime/__init__.py` into several small `.py` files
The current parsedatetime/__init__.py is extremely huge (~ 2,800 lines) which is not human-friendly for both reading and debugging. We should find a way to separate this one into several small modules. My suggestion is:
__init__.py- an empty init module only import classes/functions that are exposed to public access;helpers.py- all helper functions, for example,_extract_date,_extract_timeand_pop_time_accuracy, etc.;parse.py- all parser functions which can be separated fromCalendarclass;calendar.py- forCalendarclass which contains all variables for parser functions (or just keepcontext.pyis enough?);constants.py- forConstantsclass which contains all constants for parser functions;shortcut.py- new shortcut functions, e.g.parse(),nlp(), etc.
These features should shoot for version 2.0 or later.
blocking https://github.com/bear/parsedatetime/issues/121