[issue47148] sys.path.append before import the module causing module don't have doc-string?

2022-03-30 Thread Zachary Ware
Zachary Ware added the comment: Also cannot reproduce on Windows: D:\issue47148_test\parent\another folder>type ..\a.py def multiply(): """multiply stuff""" return 2 * 4 D:\issue47148_test\parent\another folder>type b.py import sys sys.path.append('..') import a

[issue47148] sys.path.append before import the module causing module don't have doc-string?

2022-03-29 Thread Rukchad Wongprayoon
Rukchad Wongprayoon added the comment: maybe try on windows? due to i did this on windows -- status: pending -> open ___ Python tracker ___

[issue47148] sys.path.append before import the module causing module don't have doc-string?

2022-03-29 Thread Zachary Ware
Zachary Ware added the comment: I can't reproduce this without the `-OO` option: -OO: do -O changes and also discard docstrings; add .opt-2 before .pyc extension Note that I did slightly adjust your `b.py` script to do `print(a.multiply.__doc__)`, but here's what I tried:

[issue47148] sys.path.append before import the module causing module don't have doc-string?

2022-03-29 Thread Rukchad Wongprayoon
Rukchad Wongprayoon added the comment: seems like it doesn't appear in the help func too -- ___ Python tracker ___ ___

[issue47148] sys.path.append before import the module causing module don't have doc-string?

2022-03-29 Thread Rukchad Wongprayoon
Rukchad Wongprayoon added the comment: here's the example code parent/a.py ```py def multiply(): """multiply stuff""" return 69*420 ``` parent/another folder/b.py ```py import sys sys.path.append('..') import a a.multiply.__doc__ # None ``` --

[issue47148] sys.path.append before import the module causing module don't have doc-string?

2022-03-29 Thread Rukchad Wongprayoon
Change by Rukchad Wongprayoon : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47148] sys.path.append before import the module causing module don't have doc-string?

2022-03-29 Thread Rukchad Wongprayoon
New submission from Rukchad Wongprayoon : How to reproduce? 1. Make a random module with doc-string in the function 2. Make a python app in new folder (under the module folder) and import it by do ```py import sys sys.path.append("..") import ``` 3. then every function will don't have