In most use cases, the Parser instance is not really necessary and it is really the dirpath that is the most important. On top of that, it being called self does not really make it very clear what it is. The reason for it being called self was historical since in an early implementation the custom parser function was actually dynamically added as a member method of the parser instance. However, currently it is simply called as a standalone function.
Since the most common use cases would just require the dirpath, it is made possible to define a parser as follows:
Fixes #96
The current required signature for parser functions is:
In most use cases, the
Parser
instance is not really necessary and it is really thedirpath
that is the most important. On top of that, it being calledself
does not really make it very clear what it is. The reason for it being calledself
was historical since in an early implementation the custom parser function was actually dynamically added as a member method of the parser instance. However, currently it is simply called as a standalone function.Since the most common use cases would just require the
dirpath
, it is made possible to define a parser as follows:In cases where the
Parser
instance is desirable, the code also accepts functions that define that as the second argument:The argument is also renamed from
self
toparser
to make it more evident as to what it refers to.