Skip to content

Conflict between specification 3.3 and 9.2.3. #77

@python-processing-unit

Description

@python-processing-unit

According to the specification section 9.2.3:

Conditions in statement position MUST accept only INT, STR, or TNS, with STR and TNS values interpreted according to the truthiness rules defined elsewhere in this specification. The interpreter MUST evaluate the IF branch first, then each ELSEIF in source order until one branch is taken, and finally the ELSE block when present and no earlier branch matched.

However, according to the specification section 3.3:

Conditions MUST accept values of any type. When evaluating a condition, the runtime MUST coerce the value to its boolean representation according to that type's conversion rules (see 4 for type-specific boolean semantics).

Section 3.3 is correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions