storm.expr.Comparable should support unary '-'
Bug #397654 reported by
Michael Hudson-Doyle
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
Fix Released
|
Medium
|
Michael Hudson-Doyle |
Bug Description
Storm appears to lack support for unary -:
>>> author = Func('coalesce', RevisionAuthor.
Traceback (most recent call last):
File "<console>", line 1, in ?
TypeError: bad operand type for unary -
You can work around this like so:
>>> author = Func('coalesce', RevisionAuthor.
But that's pretty heinous.
It doesn't look like this would be very hard to fix.
Related branches
lp:~mwhudson/storm/unary-minus
- Gustavo Niemeyer: Approve
- James Henstridge: Approve
- Diff: 64 lines
Changed in storm: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Merged to storm/trunk r313:
Michael Hudson 2009-07-22 [merge]
Merged unary-minus [r=jamesh,niemeyer] [f=397654]
A new Neg expression provides support for unary minus. A minus is
automatically prepended to the expression passed to Neg. A couple
of failures in the Zope doctest related to differences in repr
formatting between python2.5 and python2.6 have also been fixed.