Dear friends!!! Please like the video and leave a comment. It helps with the visibility of my channel on KZitem. If you are interested in reading, you can always check out my latest articles on pythonology.eu Thanks a lot!
@jesprotech
10 ай бұрын
This is great to know! Very interesting to learn about PyDoc and how we can automatically generate documentation! This could also in theory be used for github docs. I wonder if that could be an easy step. Then we could in theory host the generated static html code directly into it and keep the repo updated! I will try that. Thanks for the great video! 👍
@Pythonology
10 ай бұрын
That sounds like a very good idea!
@irfanshaikh262
10 ай бұрын
Hi there once again. I will definitely use this module for my new chat sentiment analyser project. Thanks a tonn. I came looking for copper but instead I found gold.....
@Pythonology
10 ай бұрын
Irfan thank you so much for your kind words and comment. Glad I helped 🙂
@NormannCfC
10 ай бұрын
I use a wrapper in my script to start several functions in a new thread using a decorator. When I tried out Pydoc, I found that the documentation only specified the wrapper's docstring for each of these functions. Unfortunately, the docstrings of the actual functions were ignored. def thread_it(func): """ A wrapper to start functions in a new thread using a decorator. Parameters ---------- func : function the function to start in a new thread """ def func_wrapper(): """ func_wrapper starts the function "func" in a new thread. """ _thread.start_new_thread(func, ()) return func_wrapper @thread_it def weather_info() -> None: """ Get weather informations using the *****-API """ while True: try: ... The output from Pydoc: weather_info = func_wrapper() func_wrapper starts the function "func" in a new thread.
@Pythonology
10 ай бұрын
OK, learned something about PyDoc today because of your question. Since inner/nested functions are not directly accessible from outside their enclosing function, PyDoc cannot generate documentation for them. However, if you want to generate documentation for the inner function, you can make it a standalone function or a method of a class.
@Pythonology
10 ай бұрын
this could be a better reply :D
@NormannCfC
10 ай бұрын
@@Pythonology Ah OK thanks. So we both learned something. Cool too 🙂
Пікірлер: 11