kuuko pushed a commit to branch master.

http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=f169d4650d19e3e50a65fd027080ee283f967dad

commit f169d4650d19e3e50a65fd027080ee283f967dad
Author: Kai Huuhko <kai.huu...@gmail.com>
Date:   Fri Apr 11 18:41:50 2014 +0300

    Ethumb: Correct the string representation functions.
---
 efl/ethumb/efl.ethumb_client.pyx | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/efl/ethumb/efl.ethumb_client.pyx b/efl/ethumb/efl.ethumb_client.pyx
index 2e4fcc3..14b5f70 100644
--- a/efl/ethumb/efl.ethumb_client.pyx
+++ b/efl/ethumb/efl.ethumb_client.pyx
@@ -162,7 +162,7 @@ cdef class Client:
         self._on_connect_callback = None
         self._on_server_die_callback = None
 
-    def __str__(self):
+    def __repr__(self):
         f, k = self.file
         tf, tk = self.thumb_path
         w, h = self.size
@@ -171,18 +171,16 @@ cdef class Client:
         aspect = ("KEEP", "IGNORE", "CROP")[self.aspect]
         if self.aspect == 2:
             aspect = "CROP[%f, %f]" % self.crop
-        return ("%s(file=(%r, %r), thumb=(%r, %r), exists=%s, size=%dx%d, "
-                "format=%s, aspect=%s, quality=%d, compress=%d, "
-                "directory=%r, category=%r)") % \
-                (self.__class__.__name__, f, k, tf, tk, self.thumb_exists(),
-                 w, h, format, aspect, self.quality, self.compress,
-                 self.directory, self.category)
-
-    def __repr__(self):
-        f, k = self.file
-        tf, tk = self.thumb_path
-        return "%s(obj=%#x, file=(%r, %r), thumb=(%r, %r), exists=%s)" % \
-            (self.__class__.__name__, <uintptr_t><void *>self, f, k, tf, tk, 
self.thumb_exists())
+        return (
+            "<%s(obj=%#x, file=(%r, %r), thumb=(%r, %r), exists=%s, "
+            "size=%dx%d, format=%s, aspect=%s, quality=%d, compress=%d, "
+            "directory=%r, category=%r)>"
+            ) % (
+            type(self).__name__, <uintptr_t><void *>self, f, k,
+            tf, tk, self.thumb_exists(),
+            w, h, format, aspect, self.quality, self.compress,
+            self.directory, self.category
+            )
 
     def on_server_die_callback_set(self, func, *args, **kargs):
         """Function to call when server dies.

-- 


Reply via email to