Python Forum
Python classes and init method
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python classes and init method
#2
User input is usually done with the input function. I wouldn't think the request_id would be given by the user, I would have that set by the program. But a typical example would be:
self.name = input('Please enter your name: ')
The string passed as a parameter to the input function is the text prompt the user would see.

Also, please use Python tags around your code (https://python-forum.io/misc.php?action=help&hid=25), and don't use formatting tags for code (this is typically caused by cut and paste from an application doing the formatting. Try pasting to a plain text editor before cutting and pasting to the forum).
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Python classes and init method - by Alaweey98 - Apr-02-2017, 06:58 PM
RE: Python classes and init method - by ichabod801 - Apr-02-2017, 07:28 PM
RE: Python classes and init method - by Alaweey98 - Apr-02-2017, 07:35 PM
RE: Python classes and init method - by ichabod801 - Apr-02-2017, 07:36 PM
RE: Python classes and init method - by Alaweey98 - Apr-02-2017, 07:44 PM
RE: Python classes and init method - by wavic - Apr-02-2017, 07:57 PM
RE: Python classes and init method - by Alaweey98 - Apr-02-2017, 08:03 PM
RE: Python classes and init method - by wavic - Apr-02-2017, 08:15 PM
RE: Python classes and init method - by ichabod801 - Apr-02-2017, 10:32 PM
RE: Python classes and init method - by wavic - Apr-03-2017, 12:02 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python networking vs classes blackknite 4 2,873 Oct-15-2018, 02:44 PM
Last Post: blackknite

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020