Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 annoying conflict: stat
#1
in a module i created to collect lots of different things i do, i ended up with:
import stat
from os import stat
they were not in the same place and the 2nd one also had lots of other functions. but at least both were in the same file. and things got even worse in my current project where the pattern of variable names i was using made sense to use stat as one of the names. but at least all the confusion with that led to the discovery of the conflict in that file. now to figure out the best way to resolve this.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Quote
#2
Always put all of your imports at the top of the file.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures

Quote
#3
i did. there were so many in that one file that they were several lines apart. all the straight imports were first, followed by all the "from" imports.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  arg and keyword arg conflict: what to raise Skaperen 5 377 Jun-22-2020, 12:43 AM
Last Post: Skaperen
  venv conflict at shell prompt Skaperen 3 765 Feb-21-2019, 02:18 AM
Last Post: Larz60+
  import time conflict Skaperen 2 1,160 Oct-15-2017, 07:44 AM
Last Post: wavic

Forum Jump:


Users browsing this thread: 1 Guest(s)