surfrdf
surfrdf copied to clipboard
Fix/rdf dict selection
Resource
used the following statement to select the appropriate dict bases on the direct
variable:
rdf_dict = direct and self.__rdf_direct or self.__rdf_inverse
This has two issues: first, it is not so easy to read and second, it results in self.__rdf_inverse
to be chosen, despite direct
is set to True
in cases where self.__rdf_direct
has no values set (which is considered False
when converted to a boolean).
This pull request replaces two of these occurrences with a conditional expression (ternary operator).