3

Pycharm is giving me a warning that I don't know how to fix.

enter image description here

So what is the wrong practice that I engaged in when coding? how can I fix this?

Alex Deft
  • 2,531
  • 1
  • 19
  • 34
  • 1
    the module doesn’t export that object publicly. – xrisk Apr 12 '20 at 01:38
  • @xrisk what do you mean? this particular line is something that I grabbed from official tutorial of that package – Alex Deft Apr 12 '20 at 01:39
  • 2
    it’s alright then, you can ignore this error. all this means is that if you do `from pydmd import *`, `DMD` won’t be imported. by convention, packages will put a list of their “public” objects into `__all__`. – xrisk Apr 12 '20 at 01:40

1 Answers1

5

PEP standard says

Any backwards compatibility guarantees apply only to public interfaces. Accordingly, it is important that users be able to clearly distinguish between public and internal interfaces.

That is why IDE PyCharm warns you from import non public interfaces.

If you happen to import all Ex:from pydmd import *( bad practice source) and you might get exception on accessing DMD although it was accessible - source.

Shakeel
  • 1,869
  • 15
  • 23