On 10/14/05, Shi Mu <[EMAIL PROTECTED]> wrote:
I found the code for class "now". I got confused by two things:
First, how did the former code I posted know to import tis module of "Now";
Second. what does "\" mean following "self.year ,"
Thanks a lot!

class now:
 
    def __str__(self):
        return time.ctime(self.t)
    def __repr__(self):
        return time.ctime(self.t)

you mean you didn't write the "former code?"  why are you asking for help with code that you did not write?  your output is caused by the 2 now methods above.  the '\' is the continuation character in Python.  are you learning Python on your own?

-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2006,2001
    http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to