From 6cd0647da96fdc009b4f30e520bb67778c2a8738 Mon Sep 17 00:00:00 2001 From: Chris Withers Date: Tue, 18 Feb 2014 21:24:59 +0000 Subject: [PATCH] documentation changes now that Range objects can be ordered --- doc/src/extras.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/src/extras.rst b/doc/src/extras.rst index a0a2d1ca..52a7056f 100644 --- a/doc/src/extras.rst +++ b/doc/src/extras.rst @@ -437,9 +437,14 @@ user-defined |range| types can be adapted using `register_range()`. `!Range` objects are immutable, hashable, and support the ``in`` operator (checking if an element is within the range). They can be tested for - equivalence but not for ordering. Empty ranges evaluate to `!False` in + equivalence. Empty ranges evaluate to `!False` in boolean context, nonempty evaluate to `!True`. + `!Range` objects can be sorted although, as on the server-side, + this ordering is not particularly meangingful. + + .. versionchanged:: 2.5.3 + Although it is possible to instantiate `!Range` objects, the class doesn't have an adapter registered, so you cannot normally pass these instances as query arguments. To use range objects as query arguments you can either