Inheritance and Attributes

Lee Harr missive at frontiernet.net
Fri Feb 14 00:45:25 CET 2003


>          print "setting " + str(self) + ".cat = \"yellow\""


Maybe you are doing it this way for a reason, but if not, note
that you can do it like this in Python:

           print "setting " + str(self) + '.cat = "yellow"'


In other words, you can use either ' or " to delimit strings
and then the other one is fine inside of the string.





More information about the Python-list mailing list