Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
import time conflict
#1
module time has a function named time.  some code does import time and calls that function like time.time().  other code does from time import time and calls that function like time().

this can lead to conflicts.

i have a module that needs to call time.sleep().  if i do an import in the module it could change what that code (the code importing my module) has for the (global) variable named time.  is there a nice resolution to this or do i need to do the import of time or time.sleep in the functions that need it?
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
import time conflict - by Skaperen - Oct-15-2017, 01:57 AM
RE: import time conflict - by ichabod801 - Oct-15-2017, 02:09 AM
RE: import time conflict - by wavic - Oct-15-2017, 07:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  arg and keyword arg conflict: what to raise Skaperen 5 2,773 Jun-22-2020, 12:43 AM
Last Post: Skaperen
  annoying conflict: stat Skaperen 2 2,209 Dec-26-2019, 06:04 AM
Last Post: Skaperen
  venv conflict at shell prompt Skaperen 3 2,845 Feb-21-2019, 02:18 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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