My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 6: Ordering methods
1 person starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  ----
Closed:  Sep 2010


 
Reported by peac...@gmail.com, Jan 10, 2008
Type: Enhancement
Priority: Low

Hi,

If you think this functions will be useful, please add to the library too.

1) move_left, move_right: move the node to the left/right of its
previous/next sibling if there is one, else do nothing

def move_left(self):
  target = self.get_previous_sibling()
  if target != None:
    self._tree_manager.move_node(self, target, "left")

def move_right(self):
  target = self.get_next_sibling()
  if target != None:
    self._tree_manager.move_node(self, target, "right")

2) sort, change children order of the node

def sort(self, attr, order='ascending', compare_callback=None):
  # check the type of attr
  # decide comparison function to be used based on attr type
  # perform in-place sorting
  # I haven't got the implementation yet :-)

Thanks.
    
  
   


 
Jan 10, 2008
Project Member #1 jonathan.buchanan
(No comment was entered for this change.)
Labels: -Type-Defect Type-Enhancement
Sep 2, 2010
Project Member #2 craig.ds@gmail.com
Can't think of a common use case for these functions
Status: WontFix

Powered by Google Project Hosting