Python Forum
skeleton class needs working instantiation guard
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
skeleton class needs working instantiation guard
#4
That peculiar. Could you post your class Point again?
I dont that error message, and see the expected behaviour.

b = Point(0.5, 3, -7)
Output:
Traceback (most recent call last): File "main.py", line 41, in <module> b = Point(0.5, 3, -7) File "main.py", line 4, in __init__ self.x = x File "main.py", line 17, in x raise AttributeError("x must be an integer") AttributeError: x must be an integer exited with non-zero status
Reply


Messages In This Thread
RE: skeleton class needs working instantiation guard - by hshivaraj - Dec-10-2017, 03:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Inheritance vs Instantiation for Python classes mr_byte31 7 2,914 Oct-14-2021, 12:58 PM
Last Post: mr_byte31
  Skeleton file export error Python Code pepapoha 4 3,525 Nov-17-2020, 02:06 AM
Last Post: pepapoha
  What is the strategy for working with class variables? AlekseyPython 3 3,033 Feb-24-2019, 05:34 AM
Last Post: AlekseyPython
  Timer class not working as expected. MuntyScruntfundle 4 2,661 Feb-02-2019, 09:47 AM
Last Post: MuntyScruntfundle
  How are these methods working within this class workerbee 3 2,941 Nov-29-2017, 04:15 PM
Last Post: hshivaraj
  If statement [Guard List] yuvalsaias 7 6,211 Apr-17-2017, 04:19 PM
Last Post: nilamo
  Class attribute not recognized\working J125 1 5,402 Dec-19-2016, 01:05 AM
Last Post: Yoriz

Forum Jump:

User Panel Messages

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