Python Forum
Type error when reading in different data types on an __init__ method
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Type error when reading in different data types on an __init__ method
#4
Change the default value for duration in the __init__():
def __init__(self, artist, title, duration=Duration(0, 0)):
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: Type error when reading in different data types on an __init__ method - by buran - May-09-2019, 02:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  What data types can I use for default values? Mark17 1 520 Oct-09-2023, 02:07 PM
Last Post: buran
  Wrong type error rowan_bradley 6 1,208 Aug-07-2023, 10:44 AM
Last Post: rowan_bradley
  xlwings error when reading a workbook Mishal0488 1 1,098 Aug-01-2023, 02:05 AM
Last Post: deanhystad
  Type Error: Unsupported Operand jhancock 2 1,160 Jul-22-2023, 11:33 PM
Last Post: jhancock
  reading a table which is of type string saisankalpj 2 957 Dec-03-2022, 11:19 AM
Last Post: saisankalpj
  Reading All The RAW Data Inside a PDF NBAComputerMan 4 1,337 Nov-30-2022, 10:54 PM
Last Post: Larz60+
  i want to use type= as a function/method keyword argument Skaperen 9 1,836 Nov-06-2022, 04:28 AM
Last Post: Skaperen
  Reading Data from JSON tpolim008 2 1,074 Sep-27-2022, 06:34 PM
Last Post: Larz60+
  In SQL Server, mix data types. shiv11 0 875 Sep-21-2022, 12:50 PM
Last Post: shiv11
  I need to add data types to cython conversion python to c Good_AI_User 1 993 Aug-19-2022, 07:52 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

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