User Profile

Collapse

Profile Sidebar

Collapse
pythonadict
pythonadict
Last Activity: May 14 '11, 09:41 PM
Joined: May 14 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • pythonadict
    replied to python class problem
    Well what I really want is make a class, that when I call it, makes an instance of class Client,

    w the name the user inputs w the keyboard like

    x=Raw_input("En ter teh name")
    >> Bill
    then program makes
    Bill = Cliente("Bill")
    and adds the Client instance name to a list, so I can remember or lsit all theclients
    See more | Go to post

    Leave a comment:


  • pythonadict
    started a topic python class problem

    python class problem

    I have a problem w python class, I come form java and its so diferent, lets show problem

    Code:
     
    
    class Client:  #define the class
       
      def __init__(self,name):
        self.name_client=name
    
    
    if __name__=="__main__": #starting point
    
    coco = raw_input("Name of the client")
    coco = Client(coco)
    print coco.name_client
    print coco
    ...
    See more | Go to post
No activity results to display
Show More
Working...