[Python-checkins] python/dist/src/Demo/metaclasses Enum.py, 1.3, 1.4 Meta.py, 1.4, 1.5 Trace.py, 1.3, 1.4

doerwalter at users.sourceforge.net doerwalter at users.sourceforge.net
Thu Feb 12 12:35:35 EST 2004


Update of /cvsroot/python/python/dist/src/Demo/metaclasses
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21620/Demo/metaclasses

Modified Files:
	Enum.py Meta.py Trace.py 
Log Message:
Replace backticks with repr() or "%r"

>From SF patch #852334.


Index: Enum.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/metaclasses/Enum.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Enum.py	14 Sep 1998 16:44:10 -0000	1.3
--- Enum.py	12 Feb 2004 17:35:02 -0000	1.4
***************
*** 108,114 ****
  
      def __repr__(self):
!         return "EnumInstance(%s, %s, %s)" % (`self.__classname`,
!                                              `self.__enumname`,
!                                              `self.__value`)
  
      def __str__(self):
--- 108,114 ----
  
      def __repr__(self):
!         return "EnumInstance(%r, %r, %r)" % (self.__classname,
!                                              self.__enumname,
!                                              self.__value)
  
      def __str__(self):

Index: Meta.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/metaclasses/Meta.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Meta.py	15 Jan 2001 16:53:58 -0000	1.4
--- Meta.py	12 Feb 2004 17:35:02 -0000	1.5
***************
*** 99,103 ****
              print "__init__, args =", args
          def m1(self, x):
!             print "m1(x=%s)" %`x`
      print C
      x = C()
--- 99,103 ----
              print "__init__, args =", args
          def m1(self, x):
!             print "m1(x=%r)" % (x,)
      print C
      x = C()

Index: Trace.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/metaclasses/Trace.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Trace.py	14 Sep 1998 16:44:11 -0000	1.3
--- Trace.py	12 Feb 2004 17:35:02 -0000	1.4
***************
*** 118,122 ****
          __trace_output__ = sys.stdout
      class D(C):
!         def m2(self, y): print "D.m2(%s)" % `y`; return C.m2(self, y)
          __trace_output__ = None
      x = C(4321)
--- 118,122 ----
          __trace_output__ = sys.stdout
      class D(C):
!         def m2(self, y): print "D.m2(%r)" % (y,); return C.m2(self, y)
          __trace_output__ = None
      x = C(4321)




More information about the Python-checkins mailing list