==:
The "Basic data handling: Equal" node is designed to determine if two values are identical. This node is versatile, allowing you to compare any two inputs, regardless of their type, to check for equality. It is particularly useful in scenarios where you need to validate if two pieces of data are the same, such as verifying user inputs, comparing data sets, or ensuring consistency across different data points. The node performs a structural equality check, meaning it can handle complex objects like lists or dictionaries, comparing their contents rather than just their references. This capability makes it a powerful tool for ensuring data integrity and consistency in your workflows.
== Input Parameters:
value1
This parameter represents the first value to be compared. It can be of any type, including integers, floats, strings, lists, dictionaries, or even custom objects. The function of this parameter is to serve as one of the two values in the equality comparison. There are no specific minimum, maximum, or default values, as it accepts any data type.
value2
This parameter represents the second value to be compared against the first. Like value1, it can be of any type and serves as the counterpart in the equality check. The comparison will determine if value2 is equal to value1. There are no specific constraints on the type or value, allowing for a wide range of comparisons.
== Output Parameters:
result
The output parameter result is a boolean value that indicates the outcome of the equality comparison. If the two input values are equal, result will be True; otherwise, it will be False. This output is crucial for decision-making processes in your workflow, as it allows you to branch logic based on whether the values match.
== Usage Tips:
- Use this node to validate user inputs by comparing them against expected values to ensure correctness.
- Leverage the node's ability to compare complex objects, such as lists or dictionaries, to verify data consistency across different sources or stages in your workflow.
== Common Errors and Solutions:
TypeError: unsupported operand type(s) for ==: 'type1' and 'type2'
- Explanation: This error occurs when the node attempts to compare two values of incompatible types that do not support equality comparison.
- Solution: Ensure that the values being compared are of compatible types or implement a custom equality method for the objects being compared.
ValueError: Comparison failed due to invalid input
- Explanation: This error might arise if one or both input values are not properly defined or are outside the expected range of values.
- Solution: Check that both input parameters are correctly set and contain valid data before executing the node.
