diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2014-02-22 23:02:19 +0000 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2014-02-22 23:02:19 +0000 |
| commit | 283dbccf56d1c3fb14eadc66bdd4e2a4bb56974e (patch) | |
| tree | 2e691b9fe6ba34336a5e8002037ad2c73c2231f7 /doc/src | |
| parent | dd9e476353b0fd0f10da40204327a951941bc2e4 (diff) | |
| parent | 8d2744c550fef74c518ef14bd304e0bc880c84c7 (diff) | |
| download | psycopg2-283dbccf56d1c3fb14eadc66bdd4e2a4bb56974e.tar.gz | |
Merge branch 'range_sort'
Diffstat (limited to 'doc/src')
| -rw-r--r-- | doc/src/extras.rst | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/src/extras.rst b/doc/src/extras.rst index a0a2d1c..7fab338 100644 --- a/doc/src/extras.rst +++ b/doc/src/extras.rst @@ -437,8 +437,16 @@ 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 - boolean context, nonempty evaluate to `!True`. + equivalence. Empty ranges evaluate to `!False` in boolean context, + nonempty evaluate to `!True`. + + .. versionchanged:: 2.5.3 + + `!Range` objects can be sorted although, as on the server-side, this + ordering is not particularly meangingful. It is only meant to be used + by programs assuming objects using `!Range` as primary key can be + sorted on them. In previous versions comparing `!Range`\s raises + `!TypeError`. Although it is possible to instantiate `!Range` objects, the class doesn't have an adapter registered, so you cannot normally pass these instances as |
