Skip to content

Instantly share code, notes, and snippets.

@kimdwkimdw
Created May 5, 2018 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimdwkimdw/50c18b5cf72c69c2d01bb4146c8a2b5c to your computer and use it in GitHub Desktop.
Save kimdwkimdw/50c18b5cf72c69c2d01bb4146c8a2b5c to your computer and use it in GitHub Desktop.
PoC for a bug in `PyTorch 0.4.0` related to IDE(eq. PyCharm)
import T_B as torch
torch.p2() # IDE can detect `p2`
torch.p1 # IDE cannot detect `p1`
"""
https://www.python.org/dev/peps/pep-0484/
"""
class A(object):
def p1(self):
"""
This is P1
:return: nothing
"""
def p2(self):
"""
This is P2
:return: nothing
"""
from T_A import A
from T_A import *
__all__ = []
for name in dir(A):
globals()[name] = getattr(A, name)
__all__+= [name]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment