开发者

Python module generator for github

开发者 https://www.devze.com 2023-03-26 09:15 出处:网络
I\'m newbie to pytho开发者_如何学Pythonn and it\'s philosophy. I\'m trying to develop a module on github. Is there any Ruby\'s gem generator like tool for developing module? How to develop a module? T

I'm newbie to pytho开发者_如何学Pythonn and it's philosophy. I'm trying to develop a module on github. Is there any Ruby's gem generator like tool for developing module? How to develop a module? Thank you for any advise.


You don't need a tool to create a python module, any filename ending in .py is sufficient. A package, which is a collection of modules, is similarly created by the presence of a file named __init__.py in the same folder as other modules (and possibly other packages). The __init__.py file can be empty or not, your choice.

Best practices dictate that importing a module should have no side effects; It should define classes and functions, but take no action. python modules should start with a docstring explaining the purpose of the module and how it should be used.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号