#16303: remove extra quotes from exception and add ().  Initial patch by Vladimir Rutsky.
diff --git a/Lib/pstats.py b/Lib/pstats.py
index 9a22965..4338994 100644
--- a/Lib/pstats.py
+++ b/Lib/pstats.py
@@ -120,8 +120,8 @@
             self.stats = arg.stats
             arg.stats = {}
         if not self.stats:
-            raise TypeError,  "Cannot create or construct a %r object from '%r''" % (
-                              self.__class__, arg)
+            raise TypeError("Cannot create or construct a %r object from %r"
+                            % (self.__class__, arg))
         return
 
     def get_top_level_stats(self):