Python Forum
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to copy an object
#4
(Aug-05-2018, 01:15 PM)metulburr Wrote: What is your purpose in deepcopying the object in the first place? From the error it seems you might be copying an object to rotate it, which would be overkill to handle such a task

I'm working with a class based on the pygame.sprite, and working on a task that involved simulating an autopilot program that kicks in when the craft strays to far off the screen. I have a routine that predicts the maximum speed the craft can turn without missing and over shooting the target angle. I thought working on a copy of the object would be the easiest way. Performing a shallow copy means I have to treat the object differently.
Reply


Messages In This Thread
How to copy an object - by microphone_head - Aug-05-2018, 09:18 AM
RE: How to copy an object - by metulburr - Aug-05-2018, 01:15 PM
RE: How to copy an object - by microphone_head - Aug-05-2018, 03:02 PM
RE: How to copy an object - by Windspar - Aug-05-2018, 01:57 PM
RE: How to copy an object - by metulburr - Aug-05-2018, 03:31 PM
RE: How to copy an object - by metulburr - Aug-05-2018, 06:38 PM
RE: How to copy an object - by Windspar - Aug-05-2018, 06:42 PM
RE: How to copy an object - by microphone_head - Aug-05-2018, 07:42 PM
RE: How to copy an object - by Windspar - Aug-05-2018, 11:17 PM

Forum Jump:

User Panel Messages

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