mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-15 05:26:37 +03:00
Docs wordsmithing about Range order
This commit is contained in:
parent
6c27cdd20e
commit
d43e23ddc6
|
@ -437,14 +437,17 @@ user-defined |range| types can be adapted using `register_range()`.
|
||||||
|
|
||||||
`!Range` objects are immutable, hashable, and support the ``in`` operator
|
`!Range` objects are immutable, hashable, and support the ``in`` operator
|
||||||
(checking if an element is within the range). They can be tested for
|
(checking if an element is within the range). They can be tested for
|
||||||
equivalence. Empty ranges evaluate to `!False` in
|
equivalence. Empty ranges evaluate to `!False` in boolean context,
|
||||||
boolean context, nonempty evaluate to `!True`.
|
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
|
.. 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
|
Although it is possible to instantiate `!Range` objects, the class doesn't
|
||||||
have an adapter registered, so you cannot normally pass these instances as
|
have an adapter registered, so you cannot normally pass these instances as
|
||||||
query arguments. To use range objects as query arguments you can either
|
query arguments. To use range objects as query arguments you can either
|
||||||
|
|
Loading…
Reference in New Issue
Block a user