forked from andialbrecht/sqlparse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfixes.diff
More file actions
44 lines (39 loc) · 1.44 KB
/
fixes.diff
File metadata and controls
44 lines (39 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--- sqlparse/engine/grouping.py.orig 2009-04-30 06:48:43.000000000 +0200
+++ sqlparse/engine/grouping.py 2009-04-30 06:48:56.000000000 +0200
@@ -107,7 +107,7 @@
T.Name,
T.Wildcard)))
for t in tl.tokens[i:]:
- if x.next()(t):
+ if next(x)(t):
yield t
else:
raise StopIteration
--- sqlparse/sql.py~ 2009-04-30 08:38:16.000000000 +0200
+++ sqlparse/sql.py 2009-04-30 08:39:15.000000000 +0200
@@ -23,16 +23,13 @@
self.ttype = ttype
def __str__(self):
- return str(self).encode('latin-1')
+ return self.value or ''
def __repr__(self):
short = self._get_repr_value()
return '<%s \'%s\' at 0x%07x>' % (self._get_repr_name(),
short, id(self))
- def __unicode__(self):
- return self.value or ''
-
def to_unicode(self):
"""Returns a unicode representation of this object."""
return str(self)
@@ -105,11 +102,8 @@
self.tokens = tokens
Token.__init__(self, None, None)
- def __unicode__(self):
- return ''.join(str(x) for x in self.flatten())
-
def __str__(self):
- return str(self).encode('latin-1')
+ return ''.join(str(x) for x in self.flatten())
def _get_repr_name(self):
return self.__class__.__name__