Python Forum
from copy import deepcopy fails
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
from copy import deepcopy fails
#8
if i were to do "from copy import foo" and still had that copy.py file which has no name "foo" in it, the import will fail and i would get the message "ImportError: cannot import name foo" because "foo" is not there in my "copy" module. python looks in my home directory first when it looks for files to import. it's a feature: that let's me substitute my own modules. then if i do that, all the same features like importing individual functions and data variables still work ... in my module ... including the error messages.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
from copy import deepcopy fails - by Skaperen - Oct-29-2016, 02:42 AM
RE: from copy import deepcopy fails - by metulburr - Oct-29-2016, 02:45 AM
RE: from copy import deepcopy fails - by Skaperen - Oct-29-2016, 03:12 AM
RE: from copy import deepcopy fails - by nilamo - Nov-07-2016, 08:11 PM
RE: from copy import deepcopy fails - by metulburr - Nov-07-2016, 10:27 PM
RE: from copy import deepcopy fails - by Larz60+ - Nov-07-2016, 11:38 PM
RE: from copy import deepcopy fails - by pratikj - Jun-07-2018, 06:53 AM
RE: from copy import deepcopy fails - by Skaperen - Jun-09-2018, 12:53 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Why is the copy method name in python list copy and not `__copy__`? YouHoGeon 2 327 Apr-04-2024, 01:18 AM
Last Post: YouHoGeon

Forum Jump:

User Panel Messages

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