Skip to content
Snippets Groups Projects
Commit 6beaf7b0 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Changed the behaviour of the sort method...

... and added a new method.

sort_ sorts a dates object in place (without a copy).
sort  first make a copy and then sorts the copy.

The first routine, with in place modification, is more efficient because
we do not have to create a new object.

Example
=======

If o is a dates object with more than one element, then

o.sort()

returns a sorted version of o without modifying o, while

o.sort_()

sorts the elements in o.
parent fe005c6f
Branches
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment