Ticket #145 (closed defect: fixed)
Problem with literals and boolean operators
| Reported by: | dagss | Owned by: | scoder |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.13 |
| Component: | Code Generation | Keywords: | |
| Cc: |
Description
Currently,
print False or 5
prints True, which doesn't agree with Python. However
def f(): return 5 print False or f()
correctly prints 5 (since 5 is now a Python object).
The reason this happens is that the 5 literal is typed as a C int which is then coerced into a boolean.
Change History
Note: See
TracTickets for help on using
tickets.
