Bugs item #2334492, was opened at 2008-11-23 23:04
Message generated for change (Comment added) made by phd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2334492&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: SQLObject release (specify)
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: reverse method does not return object
Initial Comment:
In SQLObject 0.10.2:
When I have a sqlobject object,
and I try something such as:
return list(object.select().reverse())
I will get an error because the reverse() method does not return Results, it just applies it into the object.
This makes ruby-style chains difficult.
----------------------------------------------------------------------
>Comment By: Oleg Broytmann (phd)
Date: 2009-04-17 20:50
Message:
Python is not Ruby. In Python methods that changes objects in place don't
return the object. Look, for example, chaining is impossible with simple
lists - list.reverse() doesn't return the list:
>>> t = (1, 2, 3)
>>> print list(t).reverse()
None
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2334492&group_id=74338
|