关于Python编码指南的文档,我在Python源文件中遇到了以下标题格式:
#!/usr/bin/env python
"""Foobar.py: Description of what foobar does."""
__author__ = "Barack Obama"
__copyright__ = "Copyright 2009, Planet Earth"
Run Code Online (Sandbox Code Playgroud)
这是Python世界中标题的标题格式吗?我可以在标题中添加哪些其他字段/信息?Python专家分享您对优秀Python源头的指导:-)
例如,如果我在vim中打开一个全新的文件,它已经包含以下文本:
/*
The MIT License
Copyright (c) 2009 Apphacker apphacker@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice …Run Code Online (Sandbox Code Playgroud)