On 11 February 2018 at 12:55, D'Arcy Cain wrote:
> On 02/11/18 06:30, Victor Porton wrote:
>> What is more pythonic?
>>
>> 1. Create its subclass PredicateParserWithError and add the additional field
>> on_error to this class.
>>
>> 2. Add on_error field to the base class,
On 02/11/18 06:30, Victor Porton wrote:
> What is more pythonic?
>
> 1. Create its subclass PredicateParserWithError and add the additional field
> on_error to this class.
>
> 2. Add on_error field to the base class, setting it to None by default, if
> the class's user does not need this
The following is a real code fragment:
##
class PredicateParser(object, metaclass=ABCMeta):
"""
Parses a given predicate (which may participate in several
relationships)
of a given RDF node.
"""
def __init__(self,