summaryrefslogtreecommitdiff
path: root/examples/usercast.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-12-01 21:37:49 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2017-12-01 21:42:14 -0800
commite335d6d2234a7bb1d83741f851dba5dbbabd6e3c (patch)
treebe5545f9f2c20bc41b500d4aac462fd40c0ea8d8 /examples/usercast.py
parenta51160317c680662c52e4a1a6b4d11beae37f205 (diff)
downloadpsycopg2-e335d6d2234a7bb1d83741f851dba5dbbabd6e3c.tar.gz
Trim trailing whitespace from all files throughout project
Many editors automatically trim whitespace on save. By trimming all files in one go, makes future diffs cleaner without extraneous whitespace changes.
Diffstat (limited to 'examples/usercast.py')
-rw-r--r--examples/usercast.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/usercast.py b/examples/usercast.py
index 87c2eea..26a5c16 100644
--- a/examples/usercast.py
+++ b/examples/usercast.py
@@ -58,7 +58,7 @@ class Rect(object):
and eventually as a type-caster for the data extracted from the database
(that's why __init__ takes the curs argument.)
"""
-
+
def __init__(self, s=None, curs=None):
"""Init the rectangle from the optional string s."""
self.x = self.y = self.width = self.height = 0.0
@@ -68,7 +68,7 @@ class Rect(object):
"""This is a terrible hack, just ignore proto and return self."""
if proto == psycopg2.extensions.ISQLQuote:
return self
-
+
def from_points(self, x0, y0, x1, y1):
"""Init the rectangle from points."""
if x0 > x1: (x0, x1) = (x1, x0)
@@ -94,7 +94,7 @@ class Rect(object):
s = "X: %d\tY: %d\tWidth: %d\tHeight: %d" % (
self.x, self.y, self.width, self.height)
return s
-
+
# here we select from the empty table, just to grab the description
curs.execute("SELECT b FROM test_cast WHERE 0=1")
boxoid = curs.description[0][1]